[jimc:m-5 13/146] net/netfilter/nf_tables_api.c:176:1: sparse: sparse: symbol 'nft_trans_scratchpad_key' was not declared. Should it be static?

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild-all
Message-ID <[email protected]>
Hi Jim,

First bad commit (maybe != root cause):

tree:   https://github.com/jimc/linux.git m-5
head:   f4586ca88dc640ffb7dea6725f1b347cd3c51bf9
commit: 1f87b3b4c4b26b883edad107c44f67ef290f0736 [13/146] lib/folio_pool: Add folio_scratchpad_discard and folio_scratchpad_trim primitives
config: x86_64-randconfig-r134-20260819 (https://download.01.org/0day-ci/archive/20260820/[email protected]/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260820/[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
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

sparse warnings: (new ones prefixed by >>)
>> net/netfilter/nf_tables_api.c:176:1: sparse: sparse: symbol 'nft_trans_scratchpad_key' was not declared. Should it be static?
   net/netfilter/nf_tables_api.c:2153:25: sparse: sparse: cast between address spaces (__percpu -> __rcu)
   net/netfilter/nf_tables_api.c:2153:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   net/netfilter/nf_tables_api.c:2153:25: sparse:    struct nft_stats [noderef] __rcu *
   net/netfilter/nf_tables_api.c:2153:25: sparse:    struct nft_stats [noderef] __percpu *
   net/netfilter/nf_tables_api.c:2356:17: sparse: sparse: cast between address spaces (__percpu -> __rcu)
   net/netfilter/nf_tables_api.c:2356:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
   net/netfilter/nf_tables_api.c:2356:17: sparse:    struct nft_stats [noderef] __rcu *
   net/netfilter/nf_tables_api.c:2356:17: sparse:    struct nft_stats [noderef] __percpu *
   net/netfilter/nf_tables_api.c:2356:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
   net/netfilter/nf_tables_api.c:2356:17: sparse:    struct nft_stats [noderef] __rcu *
   net/netfilter/nf_tables_api.c:2356:17: sparse:    struct nft_stats [noderef] __percpu *
   net/netfilter/nf_tables_api.c:2397:21: sparse: sparse: cast between address spaces (__percpu -> __rcu)
   net/netfilter/nf_tables_api.c:2397:21: sparse: sparse: incompatible types in comparison expression (different address spaces):
   net/netfilter/nf_tables_api.c:2397:21: sparse:    struct nft_stats [noderef] __rcu *
   net/netfilter/nf_tables_api.c:2397:21: sparse:    struct nft_stats [noderef] __percpu *
   net/netfilter/nf_tables_api.c:2806:25: sparse: sparse: cast between address spaces (__percpu -> __rcu)
   net/netfilter/nf_tables_api.c:2806:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   net/netfilter/nf_tables_api.c:2806:25: sparse:    struct nft_stats [noderef] __rcu *
   net/netfilter/nf_tables_api.c:2806:25: sparse:    struct nft_stats [noderef] __percpu *

vim +/nft_trans_scratchpad_key +176 net/netfilter/nf_tables_api.c

7c95f6d866d8612 Pablo Neira Ayuso 2014-04-04  175  
8617fdbcbac6d40 Jim Cromie        2026-08-14 @176  DEFINE_FOLIO_POOL_STATIC_KEY_PARAM(nft_trans_scratchpad_key, trans_scratchpad,
8617fdbcbac6d40 Jim Cromie        2026-08-14  177  				   "Toggle nf_tables transaction folio scratchpad allocator");
8617fdbcbac6d40 Jim Cromie        2026-08-14  178  

:::::: The code at line 176 was first introduced by commit
:::::: 8617fdbcbac6d400488b7c147ad71cffeb71d163 netfilter/nf_tables: Add folio_scratchpad collector to struct nftables_pernet

:::::: TO: Jim Cromie <[email protected]>
:::::: CC: Jim Cromie <[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.