[tip:sched/core 5/14] kernel/livepatch/transition.c:17:1: sparse: sparse: symbol '__pcpu_scope_klp_stack_entries' was not declared. Should it be static?

From: kernel test robot
Date: Sun Apr 23 2023 - 06:05:12 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core
head: f31dcb152a3d0816e2f1deab4e64572336da197d
commit: e92606fa172f63a26054885b9715be86c643229d [5/14] livepatch: Convert stack entries array to percpu
config: s390-randconfig-s052-20230423 (https://download.01.org/0day-ci/archive/20230423/202304231758.aIvBHUWI-lkp@xxxxxxxxx/config)
compiler: s390-linux-gcc (GCC) 12.1.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-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=e92606fa172f63a26054885b9715be86c643229d
git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
git fetch --no-tags tip sched/core
git checkout e92606fa172f63a26054885b9715be86c643229d
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=s390 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=s390 SHELL=/bin/bash kernel/livepatch/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202304231758.aIvBHUWI-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> kernel/livepatch/transition.c:17:1: sparse: sparse: symbol '__pcpu_scope_klp_stack_entries' was not declared. Should it be static?

vim +/__pcpu_scope_klp_stack_entries +17 kernel/livepatch/transition.c

16
> 17 #define MAX_STACK_ENTRIES 100
18 DEFINE_PER_CPU(unsigned long[MAX_STACK_ENTRIES], klp_stack_entries);
19

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests