From: kernel test robot <lkp@intel.com>
To: Mateusz Guzik <mjguzik@gmail.com>, brauner@kernel.org
Cc: oe-kbuild-all@lists.linux.dev, viro@zeniv.linux.org.uk,
jack@suse.cz, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org, torvalds@linux-foundation.org,
pfalcato@suse.de, Mateusz Guzik <mjguzik@gmail.com>
Subject: Re: [PATCH v2] fs: hide names_cachep behind runtime access machinery
Date: Thu, 30 Oct 2025 18:34:55 +0800 [thread overview]
Message-ID: <202510301846.5be7UPQy-lkp@intel.com> (raw)
In-Reply-To: <20251030085949.787504-1-mjguzik@gmail.com>
Hi Mateusz,
kernel test robot noticed the following build warnings:
[auto build test WARNING on arnd-asm-generic/master]
[also build test WARNING on linus/master brauner-vfs/vfs.all linux/master v6.18-rc3 next-20251030]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Mateusz-Guzik/fs-hide-names_cachep-behind-runtime-access-machinery/20251030-170230
base: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git master
patch link: https://lore.kernel.org/r/20251030085949.787504-1-mjguzik%40gmail.com
patch subject: [PATCH v2] fs: hide names_cachep behind runtime access machinery
config: nios2-allnoconfig (https://download.01.org/0day-ci/archive/20251030/202510301846.5be7UPQy-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251030/202510301846.5be7UPQy-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/202510301846.5be7UPQy-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from include/linux/percpu.h:5,
from include/linux/radix-tree.h:16,
from include/linux/idr.h:15,
from include/linux/kernfs.h:12,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/energy_model.h:7,
from include/linux/device.h:16,
from drivers/base/firmware_loader/main.c:14:
drivers/base/firmware_loader/main.c: In function 'fw_get_filesystem_firmware':
include/linux/fs.h:2965:33: error: implicit declaration of function 'runtime_const_ptr' [-Werror=implicit-function-declaration]
2965 | #define __names_cachep runtime_const_ptr(names_cachep)
| ^~~~~~~~~~~~~~~~~
include/linux/alloc_tag.h:239:16: note: in definition of macro 'alloc_hooks_tag'
239 | typeof(_do_alloc) _res; \
| ^~~~~~~~~
include/linux/slab.h:739:49: note: in expansion of macro 'alloc_hooks'
739 | #define kmem_cache_alloc(...) alloc_hooks(kmem_cache_alloc_noprof(__VA_ARGS__))
| ^~~~~~~~~~~
include/linux/fs.h:2968:33: note: in expansion of macro 'kmem_cache_alloc'
2968 | #define __getname() kmem_cache_alloc(__names_cachep, GFP_KERNEL)
| ^~~~~~~~~~~~~~~~
include/linux/fs.h:2968:50: note: in expansion of macro '__names_cachep'
2968 | #define __getname() kmem_cache_alloc(__names_cachep, GFP_KERNEL)
| ^~~~~~~~~~~~~~
drivers/base/firmware_loader/main.c:509:16: note: in expansion of macro '__getname'
509 | path = __getname();
| ^~~~~~~~~
>> include/linux/fs.h:2965:33: warning: passing argument 1 of 'kmem_cache_alloc_noprof' makes pointer from integer without a cast [-Wint-conversion]
2965 | #define __names_cachep runtime_const_ptr(names_cachep)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
include/linux/alloc_tag.h:239:16: note: in definition of macro 'alloc_hooks_tag'
239 | typeof(_do_alloc) _res; \
| ^~~~~~~~~
include/linux/slab.h:739:49: note: in expansion of macro 'alloc_hooks'
739 | #define kmem_cache_alloc(...) alloc_hooks(kmem_cache_alloc_noprof(__VA_ARGS__))
| ^~~~~~~~~~~
include/linux/fs.h:2968:33: note: in expansion of macro 'kmem_cache_alloc'
2968 | #define __getname() kmem_cache_alloc(__names_cachep, GFP_KERNEL)
| ^~~~~~~~~~~~~~~~
include/linux/fs.h:2968:50: note: in expansion of macro '__names_cachep'
2968 | #define __getname() kmem_cache_alloc(__names_cachep, GFP_KERNEL)
| ^~~~~~~~~~~~~~
drivers/base/firmware_loader/main.c:509:16: note: in expansion of macro '__getname'
509 | path = __getname();
| ^~~~~~~~~
In file included from include/linux/mm.h:34,
from include/linux/pid_namespace.h:7,
from include/linux/ptrace.h:10,
from arch/nios2/include/uapi/asm/elf.h:24,
from arch/nios2/include/asm/elf.h:9,
from include/linux/elf.h:6,
from include/linux/module.h:20,
from include/linux/device/driver.h:21,
from include/linux/device.h:32,
from drivers/base/firmware_loader/main.c:14:
include/linux/slab.h:737:50: note: expected 'struct kmem_cache *' but argument is of type 'int'
737 | void *kmem_cache_alloc_noprof(struct kmem_cache *cachep,
| ~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from include/linux/percpu.h:5,
from include/linux/radix-tree.h:16,
from include/linux/idr.h:15,
from include/linux/kernfs.h:12,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/energy_model.h:7,
from include/linux/device.h:16,
from drivers/base/firmware_loader/main.c:14:
>> include/linux/fs.h:2965:33: warning: passing argument 1 of 'kmem_cache_alloc_noprof' makes pointer from integer without a cast [-Wint-conversion]
2965 | #define __names_cachep runtime_const_ptr(names_cachep)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
include/linux/alloc_tag.h:243:24: note: in definition of macro 'alloc_hooks_tag'
243 | _res = _do_alloc; \
| ^~~~~~~~~
include/linux/slab.h:739:49: note: in expansion of macro 'alloc_hooks'
739 | #define kmem_cache_alloc(...) alloc_hooks(kmem_cache_alloc_noprof(__VA_ARGS__))
| ^~~~~~~~~~~
include/linux/fs.h:2968:33: note: in expansion of macro 'kmem_cache_alloc'
2968 | #define __getname() kmem_cache_alloc(__names_cachep, GFP_KERNEL)
| ^~~~~~~~~~~~~~~~
include/linux/fs.h:2968:50: note: in expansion of macro '__names_cachep'
2968 | #define __getname() kmem_cache_alloc(__names_cachep, GFP_KERNEL)
| ^~~~~~~~~~~~~~
drivers/base/firmware_loader/main.c:509:16: note: in expansion of macro '__getname'
509 | path = __getname();
| ^~~~~~~~~
In file included from include/linux/mm.h:34,
from include/linux/pid_namespace.h:7,
from include/linux/ptrace.h:10,
from arch/nios2/include/uapi/asm/elf.h:24,
from arch/nios2/include/asm/elf.h:9,
from include/linux/elf.h:6,
from include/linux/module.h:20,
from include/linux/device/driver.h:21,
from include/linux/device.h:32,
from drivers/base/firmware_loader/main.c:14:
include/linux/slab.h:737:50: note: expected 'struct kmem_cache *' but argument is of type 'int'
737 | void *kmem_cache_alloc_noprof(struct kmem_cache *cachep,
| ~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from include/linux/percpu.h:5,
from include/linux/radix-tree.h:16,
from include/linux/idr.h:15,
from include/linux/kernfs.h:12,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/energy_model.h:7,
from include/linux/device.h:16,
from drivers/base/firmware_loader/main.c:14:
>> include/linux/fs.h:2965:33: warning: passing argument 1 of 'kmem_cache_alloc_noprof' makes pointer from integer without a cast [-Wint-conversion]
2965 | #define __names_cachep runtime_const_ptr(names_cachep)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
include/linux/alloc_tag.h:246:24: note: in definition of macro 'alloc_hooks_tag'
246 | _res = _do_alloc; \
| ^~~~~~~~~
include/linux/slab.h:739:49: note: in expansion of macro 'alloc_hooks'
739 | #define kmem_cache_alloc(...) alloc_hooks(kmem_cache_alloc_noprof(__VA_ARGS__))
| ^~~~~~~~~~~
include/linux/fs.h:2968:33: note: in expansion of macro 'kmem_cache_alloc'
2968 | #define __getname() kmem_cache_alloc(__names_cachep, GFP_KERNEL)
| ^~~~~~~~~~~~~~~~
include/linux/fs.h:2968:50: note: in expansion of macro '__names_cachep'
2968 | #define __getname() kmem_cache_alloc(__names_cachep, GFP_KERNEL)
| ^~~~~~~~~~~~~~
drivers/base/firmware_loader/main.c:509:16: note: in expansion of macro '__getname'
509 | path = __getname();
| ^~~~~~~~~
In file included from include/linux/mm.h:34,
from include/linux/pid_namespace.h:7,
from include/linux/ptrace.h:10,
from arch/nios2/include/uapi/asm/elf.h:24,
from arch/nios2/include/asm/elf.h:9,
from include/linux/elf.h:6,
from include/linux/module.h:20,
from include/linux/device/driver.h:21,
from include/linux/device.h:32,
from drivers/base/firmware_loader/main.c:14:
include/linux/slab.h:737:50: note: expected 'struct kmem_cache *' but argument is of type 'int'
737 | void *kmem_cache_alloc_noprof(struct kmem_cache *cachep,
| ~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from include/linux/huge_mm.h:7,
from include/linux/mm.h:1016,
from include/linux/pid_namespace.h:7,
from include/linux/ptrace.h:10,
from arch/nios2/include/uapi/asm/elf.h:24,
from arch/nios2/include/asm/elf.h:9,
from include/linux/elf.h:6,
from include/linux/module.h:20,
from include/linux/device/driver.h:21,
from include/linux/device.h:32,
from drivers/base/firmware_loader/main.c:14:
>> include/linux/fs.h:2965:33: warning: passing argument 1 of 'kmem_cache_free' makes pointer from integer without a cast [-Wint-conversion]
2965 | #define __names_cachep runtime_const_ptr(names_cachep)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
include/linux/fs.h:2969:49: note: in expansion of macro '__names_cachep'
2969 | #define __putname(name) kmem_cache_free(__names_cachep, (void *)(name))
| ^~~~~~~~~~~~~~
drivers/base/firmware_loader/main.c:591:9: note: in expansion of macro '__putname'
591 | __putname(path);
| ^~~~~~~~~
In file included from include/linux/mm.h:34,
from include/linux/pid_namespace.h:7,
from include/linux/ptrace.h:10,
from arch/nios2/include/uapi/asm/elf.h:24,
from arch/nios2/include/asm/elf.h:9,
from include/linux/elf.h:6,
from include/linux/module.h:20,
from include/linux/device/driver.h:21,
from include/linux/device.h:32,
from drivers/base/firmware_loader/main.c:14:
include/linux/slab.h:774:41: note: expected 'struct kmem_cache *' but argument is of type 'int'
774 | void kmem_cache_free(struct kmem_cache *s, void *objp);
| ~~~~~~~~~~~~~~~~~~~^
cc1: some warnings being treated as errors
vim +/kmem_cache_alloc_noprof +2965 include/linux/fs.h
2958
2959 /*
2960 * XXX The runtime_const machinery does not support modules at the moment.
2961 */
2962 #ifdef MODULE
2963 #define __names_cachep names_cachep
2964 #else
> 2965 #define __names_cachep runtime_const_ptr(names_cachep)
2966 #endif
2967
> 2968 #define __getname() kmem_cache_alloc(__names_cachep, GFP_KERNEL)
2969 #define __putname(name) kmem_cache_free(__names_cachep, (void *)(name))
2970
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-10-30 10:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-30 8:59 [PATCH v2] fs: hide names_cachep behind runtime access machinery Mateusz Guzik
2025-10-30 10:34 ` kernel test robot [this message]
2025-10-30 10:34 ` kernel test robot
2025-10-30 10:34 ` kernel test robot
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=202510301846.5be7UPQy-lkp@intel.com \
--to=lkp@intel.com \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjguzik@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pfalcato@suse.de \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).