fs/fscache/cookie.c:32:14: sparse: sparse: symbol 'fscache_lru_cookie_timeout' was not declared. Should it be static?

From: kernel test robot
Date: Tue Jan 25 2022 - 04:34:09 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dd81e1c7d5fb126e5fbc5c9e334d7b3ec29a16a0
commit: 12bb21a29c19aae50cfad4e2bb5c943108f34a7d fscache: Implement cookie user counting and resource pinning
date: 3 weeks ago
config: csky-randconfig-s032-20220120 (https://download.01.org/0day-ci/archive/20220125/202201251717.ssGUprks-lkp@xxxxxxxxx/config)
compiler: csky-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=12bb21a29c19aae50cfad4e2bb5c943108f34a7d
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 12bb21a29c19aae50cfad4e2bb5c943108f34a7d
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=csky SHELL=/bin/bash block// fs/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)
>> fs/fscache/cookie.c:32:14: sparse: sparse: symbol 'fscache_lru_cookie_timeout' was not declared. Should it be static?

vim +/fscache_lru_cookie_timeout +32 fs/fscache/cookie.c

23
24 #define fscache_cookie_hash_shift 15
25 static struct hlist_bl_head fscache_cookie_hash[1 << fscache_cookie_hash_shift];
26 static LIST_HEAD(fscache_cookies);
27 static DEFINE_RWLOCK(fscache_cookies_lock);
28 static LIST_HEAD(fscache_cookie_lru);
29 static DEFINE_SPINLOCK(fscache_cookie_lru_lock);
30 DEFINE_TIMER(fscache_cookie_lru_timer, fscache_cookie_lru_timed_out);
31 static DECLARE_WORK(fscache_cookie_lru_work, fscache_cookie_lru_worker);
> 32 static const char fscache_cookie_states[FSCACHE_COOKIE_STATE__NR] = "-LCAIFUWRD";
33 unsigned int fscache_lru_cookie_timeout = 10 * HZ;
34

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx