arch/mips/lantiq/falcon/prom.c:43:9: sparse: sparse: incorrect type in argument 2 (different address spaces)

From: kernel test robot
Date: Sun Aug 16 2020 - 03:48:55 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4b6c093e21d36bede0fd88fd0aeb3b03647260e4
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 8 weeks ago
config: mips-randconfig-s032-20200814 (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.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.2-168-g9554805c-dirty
git checkout 670d0a4b10704667765f7d18f7592993d02783aa
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=mips

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


sparse warnings: (new ones prefixed by >>)

>> arch/mips/lantiq/falcon/prom.c:43:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void * @@
>> arch/mips/lantiq/falcon/prom.c:43:9: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/lantiq/falcon/prom.c:43:9: sparse: got void *
arch/mips/lantiq/falcon/prom.c:39:13: sparse: sparse: symbol 'ltq_soc_nmi_setup' was not declared. Should it be static?
arch/mips/lantiq/falcon/prom.c:50:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void * @@
arch/mips/lantiq/falcon/prom.c:50:9: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/lantiq/falcon/prom.c:50:9: sparse: got void *
arch/mips/lantiq/falcon/prom.c:46:13: sparse: sparse: symbol 'ltq_soc_ejtag_setup' was not declared. Should it be static?
>> arch/mips/lantiq/falcon/prom.c:56:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int [usertype] * @@
>> arch/mips/lantiq/falcon/prom.c:56:23: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/lantiq/falcon/prom.c:56:23: sparse: got unsigned int [usertype] *
arch/mips/lantiq/falcon/prom.c:57:19: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int [usertype] * @@
arch/mips/lantiq/falcon/prom.c:57:19: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/lantiq/falcon/prom.c:57:19: sparse: got unsigned int [usertype] *
arch/mips/lantiq/falcon/prom.c:58:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int [usertype] * @@
arch/mips/lantiq/falcon/prom.c:58:21: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/lantiq/falcon/prom.c:58:21: sparse: got unsigned int [usertype] *
arch/mips/lantiq/falcon/prom.c:66:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int [usertype] * @@
arch/mips/lantiq/falcon/prom.c:66:25: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/lantiq/falcon/prom.c:66:25: sparse: got unsigned int [usertype] *
--
>> arch/mips/lantiq/falcon/reset.c:40:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void * @@
>> arch/mips/lantiq/falcon/reset.c:40:9: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/lantiq/falcon/reset.c:40:9: sparse: got void *
arch/mips/lantiq/falcon/reset.c:41:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void * @@
arch/mips/lantiq/falcon/reset.c:41:9: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/lantiq/falcon/reset.c:41:9: sparse: got void *
arch/mips/lantiq/falcon/reset.c:42:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void * @@
arch/mips/lantiq/falcon/reset.c:42:9: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/lantiq/falcon/reset.c:42:9: sparse: got void *
arch/mips/lantiq/falcon/reset.c:45:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void * @@
arch/mips/lantiq/falcon/reset.c:45:9: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/lantiq/falcon/reset.c:45:9: sparse: got void *
arch/mips/lantiq/falcon/reset.c:46:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void * @@
arch/mips/lantiq/falcon/reset.c:46:9: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/lantiq/falcon/reset.c:46:9: sparse: got void *

vim +43 arch/mips/lantiq/falcon/prom.c

d41ced01f21ddd2 John Crispin 2012-04-19 38
d41ced01f21ddd2 John Crispin 2012-04-19 39 void __init ltq_soc_nmi_setup(void)
d41ced01f21ddd2 John Crispin 2012-04-19 40 {
d41ced01f21ddd2 John Crispin 2012-04-19 41 extern void (*nmi_handler)(void);
d41ced01f21ddd2 John Crispin 2012-04-19 42
d41ced01f21ddd2 John Crispin 2012-04-19 @43 ltq_w32((unsigned long)&nmi_handler, (void *)BOOT_NVEC);
d41ced01f21ddd2 John Crispin 2012-04-19 44 }
d41ced01f21ddd2 John Crispin 2012-04-19 45
d41ced01f21ddd2 John Crispin 2012-04-19 46 void __init ltq_soc_ejtag_setup(void)
d41ced01f21ddd2 John Crispin 2012-04-19 47 {
d41ced01f21ddd2 John Crispin 2012-04-19 48 extern void (*ejtag_debug_handler)(void);
d41ced01f21ddd2 John Crispin 2012-04-19 49
d41ced01f21ddd2 John Crispin 2012-04-19 50 ltq_w32((unsigned long)&ejtag_debug_handler, (void *)BOOT_EVEC);
d41ced01f21ddd2 John Crispin 2012-04-19 51 }
d41ced01f21ddd2 John Crispin 2012-04-19 52
d41ced01f21ddd2 John Crispin 2012-04-19 53 void __init ltq_soc_detect(struct ltq_soc_info *i)
d41ced01f21ddd2 John Crispin 2012-04-19 54 {
d41ced01f21ddd2 John Crispin 2012-04-19 55 u32 type;
d41ced01f21ddd2 John Crispin 2012-04-19 @56 i->partnum = (ltq_r32(FALCON_CHIPID) & PART_MASK) >> PART_SHIFT;

:::::: The code at line 43 was first introduced by commit
:::::: d41ced01f21ddd2c3a01531bb9edf6c41064e9fc MIPS: lantiq: implement support for FALCON soc

:::::: TO: John Crispin <blogic@xxxxxxxxxxx>
:::::: CC: Ralf Baechle <ralf@xxxxxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip