arch/sh/include/cpu-sh2/cpu/watchdog.h:44:16: sparse: sparse: incorrect type in argument 1 (different base types)

From: kernel test robot
Date: Mon Dec 04 2023 - 19:57:55 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: bee0e7762ad2c6025b9f5245c040fcc36ef2bde8
commit: e5fc436f06eef54ef512ea55a9db8eb9f2e76959 sparse: use static inline for __chk_{user,io}_ptr()
date: 3 years, 3 months ago
config: sh-randconfig-r111-20231117 (https://download.01.org/0day-ci/archive/20231205/202312050810.GJwZDVwY-lkp@xxxxxxxxx/config)
compiler: sh4-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231205/202312050810.GJwZDVwY-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/202312050810.GJwZDVwY-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
drivers/watchdog/shwdt.c: note: in included file:
arch/sh/include/asm/watchdog.h:144:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/include/asm/watchdog.h:144:16: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/include/asm/watchdog.h:144:16: sparse: got unsigned int
arch/sh/include/asm/watchdog.h:156:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/include/asm/watchdog.h:156:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/include/asm/watchdog.h:156:9: sparse: got unsigned int
arch/sh/include/asm/watchdog.h:134:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/include/asm/watchdog.h:134:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/include/asm/watchdog.h:134:9: sparse: got unsigned int
arch/sh/include/asm/watchdog.h:144:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/include/asm/watchdog.h:144:16: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/include/asm/watchdog.h:144:16: sparse: got unsigned int
arch/sh/include/asm/watchdog.h:156:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/include/asm/watchdog.h:156:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/include/asm/watchdog.h:156:9: sparse: got unsigned int
drivers/watchdog/shwdt.c: note: in included file (through arch/sh/include/asm/watchdog.h):
>> arch/sh/include/cpu-sh2/cpu/watchdog.h:44:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/include/cpu-sh2/cpu/watchdog.h:44:16: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/include/cpu-sh2/cpu/watchdog.h:44:16: sparse: got unsigned int
arch/sh/include/cpu-sh2/cpu/watchdog.h:62:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/include/cpu-sh2/cpu/watchdog.h:62:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/include/cpu-sh2/cpu/watchdog.h:62:9: sparse: got unsigned int
drivers/watchdog/shwdt.c: note: in included file:
arch/sh/include/asm/watchdog.h:144:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/include/asm/watchdog.h:144:16: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/include/asm/watchdog.h:144:16: sparse: got unsigned int
arch/sh/include/asm/watchdog.h:156:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/include/asm/watchdog.h:156:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/include/asm/watchdog.h:156:9: sparse: got unsigned int
arch/sh/include/asm/watchdog.h:144:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/include/asm/watchdog.h:144:16: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/include/asm/watchdog.h:144:16: sparse: got unsigned int
arch/sh/include/asm/watchdog.h:156:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/include/asm/watchdog.h:156:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/include/asm/watchdog.h:156:9: sparse: got unsigned int
arch/sh/include/asm/watchdog.h:134:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/include/asm/watchdog.h:134:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/include/asm/watchdog.h:134:9: sparse: got unsigned int

vim +44 arch/sh/include/cpu-sh2/cpu/watchdog.h

^1da177e4c3f41 include/asm-sh/cpu-sh2/watchdog.h Linus Torvalds 2005-04-16 33
^1da177e4c3f41 include/asm-sh/cpu-sh2/watchdog.h Linus Torvalds 2005-04-16 34 /**
^1da177e4c3f41 include/asm-sh/cpu-sh2/watchdog.h Linus Torvalds 2005-04-16 35 * sh_wdt_read_rstcsr - Read from Reset Control/Status Register
^1da177e4c3f41 include/asm-sh/cpu-sh2/watchdog.h Linus Torvalds 2005-04-16 36 *
^1da177e4c3f41 include/asm-sh/cpu-sh2/watchdog.h Linus Torvalds 2005-04-16 37 * Reads back the RSTCSR value.
^1da177e4c3f41 include/asm-sh/cpu-sh2/watchdog.h Linus Torvalds 2005-04-16 38 */
^1da177e4c3f41 include/asm-sh/cpu-sh2/watchdog.h Linus Torvalds 2005-04-16 39 static inline __u8 sh_wdt_read_rstcsr(void)
^1da177e4c3f41 include/asm-sh/cpu-sh2/watchdog.h Linus Torvalds 2005-04-16 40 {
^1da177e4c3f41 include/asm-sh/cpu-sh2/watchdog.h Linus Torvalds 2005-04-16 41 /*
^1da177e4c3f41 include/asm-sh/cpu-sh2/watchdog.h Linus Torvalds 2005-04-16 42 * Same read/write brain-damage as for WTCNT here..
^1da177e4c3f41 include/asm-sh/cpu-sh2/watchdog.h Linus Torvalds 2005-04-16 43 */
9d56dd3b083a3b arch/sh/include/cpu-sh2/cpu/watchdog.h Paul Mundt 2010-01-26 @44 return __raw_readb(RSTCSR_R);
^1da177e4c3f41 include/asm-sh/cpu-sh2/watchdog.h Linus Torvalds 2005-04-16 45 }
^1da177e4c3f41 include/asm-sh/cpu-sh2/watchdog.h Linus Torvalds 2005-04-16 46

:::::: The code at line 44 was first introduced by commit
:::::: 9d56dd3b083a3bec56e9da35ce07baca81030b03 sh: Mass ctrl_in/outX to __raw_read/writeX conversion.

:::::: TO: Paul Mundt <lethal@xxxxxxxxxxxx>
:::::: CC: Paul Mundt <lethal@xxxxxxxxxxxx>

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