arch/riscv/kernel/paravirt.c:44:1: sparse: sparse: symbol '__pcpu_scope_steal_time' was not declared. Should it be static?

From: kernel test robot
Date: Tue Jan 30 2024 - 04:26:42 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 861c0981648f5b64c86fd028ee622096eb7af05a
commit: fdf68acccfc6af9497c34ee411d89af13b6516ed RISC-V: paravirt: Implement steal-time support
date: 4 weeks ago
config: riscv-randconfig-r133-20240130 (https://download.01.org/0day-ci/archive/20240130/202401301733.XLBqnyLY-lkp@xxxxxxxxx/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 4a39d08908942b2d415db405844cbe4af73e75d4)
reproduce: (https://download.01.org/0day-ci/archive/20240130/202401301733.XLBqnyLY-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401301733.XLBqnyLY-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> arch/riscv/kernel/paravirt.c:44:1: sparse: sparse: symbol '__pcpu_scope_steal_time' was not declared. Should it be static?
arch/riscv/kernel/paravirt.c:106:19: sparse: sparse: cast to restricted __le32
arch/riscv/kernel/paravirt.c:107:30: sparse: sparse: restricted __le32 degrades to integer
arch/riscv/kernel/paravirt.c:102:26: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sequence @@ got restricted __le32 @@
arch/riscv/kernel/paravirt.c:102:26: sparse: expected unsigned int [usertype] sequence
arch/riscv/kernel/paravirt.c:102:26: sparse: got restricted __le32
arch/riscv/kernel/paravirt.c:104:23: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] steal @@ got restricted __le64 @@
arch/riscv/kernel/paravirt.c:104:23: sparse: expected unsigned long long [usertype] steal
arch/riscv/kernel/paravirt.c:104:23: sparse: got restricted __le64
arch/riscv/kernel/paravirt.c:109:16: sparse: sparse: cast to restricted __le64

vim +/__pcpu_scope_steal_time +44 arch/riscv/kernel/paravirt.c

43
> 44 DEFINE_PER_CPU(struct sbi_sta_struct, steal_time) __aligned(64);
45

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