fs/namei.c:142:16: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild-all,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   fce2dfa773ced15f27dd27cd0b482a7473cdcf2a
commit: feb662d9168b63e1d4c02671ec96005410c6f3ce slab: support for compiler-assisted type-based slab cache partitioning
date:   9 weeks ago
config: i386-randconfig-r123-20260717 (https://download.01.org/0day-ci/archive/20260717/[email protected]/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260717/[email protected]/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
| Fixes: feb662d9168b ("slab: support for compiler-assisted type-based slab cache partitioning")
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

sparse warnings: (new ones prefixed by >>)
   fs/namei.c:159:33: sparse: sparse: undefined identifier '__builtin_infer_alloc_token'
   fs/namei.c:159:33: sparse: sparse: undefined identifier '__builtin_infer_alloc_token'
   fs/namei.c:159:33: sparse: sparse: undefined identifier '__builtin_infer_alloc_token'
   fs/namei.c:793:12: sparse: sparse: undefined identifier '__builtin_infer_alloc_token'
   fs/namei.c:793:12: sparse: sparse: undefined identifier '__builtin_infer_alloc_token'
   fs/namei.c:793:12: sparse: sparse: undefined identifier '__builtin_infer_alloc_token'
>> fs/namei.c:142:16: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
>> fs/namei.c:142:16: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
   fs/namei.c:147:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)

vim +142 fs/namei.c

c3a3577cdb351e Al Viro       2025-11-19  139  
c3a3577cdb351e Al Viro       2025-11-19  140  static inline struct filename *alloc_filename(void)
c3a3577cdb351e Al Viro       2025-11-19  141  {
7ca83f8ebe8670 Mateusz Guzik 2025-12-01 @142  	return kmem_cache_alloc(names_cache, GFP_KERNEL);
c3a3577cdb351e Al Viro       2025-11-19  143  }
91a27b2a756784 Jeff Layton   2012-10-10  144  

:::::: The code at line 142 was first introduced by commit
:::::: 7ca83f8ebe86706c4164ac21871f4a5adb86a430 fs: hide names_cache behind runtime const machinery

:::::: TO: Mateusz Guzik <[email protected]>
:::::: CC: Al Viro <[email protected]>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.