arch/powerpc/kernel/time.c:788:9: sparse: sparse: incorrect type in initializer (different address spaces)

From: kernel test robot
Date: Wed Nov 29 2023 - 10:44:44 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 18d46e76d7c2eedd8577fae67e3f1d4db25018b0
commit: 481461f5109919babbb393d6f68002936b8e2493 linux/export.h: make <linux/export.h> independent of CONFIG_MODULES
date: 4 months ago
config: powerpc-randconfig-c042-20230517 (https://download.01.org/0day-ci/archive/20231129/202311292258.2P0hVLX1-lkp@xxxxxxxxx/config)
compiler: powerpc-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20231129/202311292258.2P0hVLX1-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/202311292258.2P0hVLX1-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> arch/powerpc/kernel/time.c:788:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long long * @@
arch/powerpc/kernel/time.c:788:9: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/powerpc/kernel/time.c:788:9: sparse: got unsigned long long *
>> arch/powerpc/kernel/time.c:788:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long long * @@
arch/powerpc/kernel/time.c:788:9: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/powerpc/kernel/time.c:788:9: sparse: got unsigned long long *
>> arch/powerpc/kernel/time.c:788:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long long * @@
arch/powerpc/kernel/time.c:788:9: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/powerpc/kernel/time.c:788:9: sparse: got unsigned long long *
>> arch/powerpc/kernel/time.c:788:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long long * @@
arch/powerpc/kernel/time.c:788:9: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/powerpc/kernel/time.c:788:9: sparse: got unsigned long long *
>> arch/powerpc/kernel/time.c:788:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long long * @@
arch/powerpc/kernel/time.c:788:9: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/powerpc/kernel/time.c:788:9: sparse: got unsigned long long *
arch/powerpc/kernel/time.c:796:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long long * @@
arch/powerpc/kernel/time.c:796:9: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/powerpc/kernel/time.c:796:9: sparse: got unsigned long long *
arch/powerpc/kernel/time.c:796:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long long * @@
arch/powerpc/kernel/time.c:796:9: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/powerpc/kernel/time.c:796:9: sparse: got unsigned long long *
arch/powerpc/kernel/time.c:796:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long long * @@
arch/powerpc/kernel/time.c:796:9: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/powerpc/kernel/time.c:796:9: sparse: got unsigned long long *
arch/powerpc/kernel/time.c:796:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long long * @@
arch/powerpc/kernel/time.c:796:9: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/powerpc/kernel/time.c:796:9: sparse: got unsigned long long *
arch/powerpc/kernel/time.c:796:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long long * @@
arch/powerpc/kernel/time.c:796:9: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/powerpc/kernel/time.c:796:9: sparse: got unsigned long long *
arch/powerpc/kernel/time.c:504:24: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long long * @@
arch/powerpc/kernel/time.c:504:24: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/powerpc/kernel/time.c:504:24: sparse: got unsigned long long *

vim +788 arch/powerpc/kernel/time.c

4a4cfe3836916e Tony Breeds 2007-09-22 784
d831d0b83f2058 Tony Breeds 2007-09-21 785 static int decrementer_set_next_event(unsigned long evt,
d831d0b83f2058 Tony Breeds 2007-09-21 786 struct clock_event_device *dev)
d831d0b83f2058 Tony Breeds 2007-09-21 787 {
6601ec1c2ba929 Christophe Leroy 2020-09-29 @788 __this_cpu_write(decrementers_next_tb, get_tb() + evt);
25aa145856cd0d Nicholas Piggin 2021-11-23 789 set_dec_or_work(evt);
0215f7d8c53fb1 Benjamin Herrenschmidt 2014-01-14 790
d831d0b83f2058 Tony Breeds 2007-09-21 791 return 0;
d831d0b83f2058 Tony Breeds 2007-09-21 792 }
d831d0b83f2058 Tony Breeds 2007-09-21 793

:::::: The code at line 788 was first introduced by commit
:::::: 6601ec1c2ba929430f5585ce7f9d9960b0e0a01d powerpc: Remove get_tb_or_rtc()

:::::: TO: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
:::::: CC: Michael Ellerman <mpe@xxxxxxxxxxxxxx>

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