From: kernel test robot <lkp@intel.com>
To: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [akpm-mm:mm-unstable 166/172] include/linux/memfd.h:27:5: warning: no previous prototype for function 'memfd_check_seals_mmap'
Date: Mon, 9 Dec 2024 12:21:55 +0800 [thread overview]
Message-ID: <202412072101.6xUaltAj-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
head: 6e165f54437931f329d09dca6c19d99af08a36e1
commit: 6b72648c4e2b94fc7df65cab28a59b185a37c997 [166/172] mm: perform all memfd seal checks in a single place
config: arm-randconfig-004-20241207 (https://download.01.org/0day-ci/archive/20241207/202412072101.6xUaltAj-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 592c0fe55f6d9a811028b5f3507be91458ab2713)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241207/202412072101.6xUaltAj-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412072101.6xUaltAj-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from fs/fcntl.c:8:
In file included from include/linux/syscalls.h:94:
In file included from include/trace/syscall.h:7:
In file included from include/linux/trace_events.h:6:
In file included from include/linux/ring_buffer.h:5:
In file included from include/linux/mm.h:2287:
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
In file included from fs/fcntl.c:26:
>> include/linux/memfd.h:27:5: warning: no previous prototype for function 'memfd_check_seals_mmap' [-Wmissing-prototypes]
27 | int memfd_check_seals_mmap(struct file *file, unsigned long *vm_flags)
| ^
include/linux/memfd.h:27:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
27 | int memfd_check_seals_mmap(struct file *file, unsigned long *vm_flags)
| ^
| static
2 warnings generated.
vim +/memfd_check_seals_mmap +27 include/linux/memfd.h
6
7 #ifdef CONFIG_MEMFD_CREATE
8 extern long memfd_fcntl(struct file *file, unsigned int cmd, unsigned int arg);
9 struct folio *memfd_alloc_folio(struct file *memfd, pgoff_t idx);
10 /*
11 * Check for any existing seals on mmap, return an error if access is denied due
12 * to sealing, or 0 otherwise.
13 *
14 * We also update VMA flags if appropriate by manipulating the VMA flags pointed
15 * to by vm_flags_ptr.
16 */
17 int memfd_check_seals_mmap(struct file *file, unsigned long *vm_flags_ptr);
18 #else
19 static inline long memfd_fcntl(struct file *f, unsigned int c, unsigned int a)
20 {
21 return -EINVAL;
22 }
23 static inline struct folio *memfd_alloc_folio(struct file *memfd, pgoff_t idx)
24 {
25 return ERR_PTR(-EINVAL);
26 }
> 27 int memfd_check_seals_mmap(struct file *file, unsigned long *vm_flags)
28 {
29 return 0;
30 }
31 #endif
32
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-12-09 4:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202412072101.6xUaltAj-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=llvm@lists.linux.dev \
--cc=lorenzo.stoakes@oracle.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox