arch/sh/kernel/cpu/sh2a/setup-sh7203.c:348:9: sparse: sparse: incorrect type in argument 1 (different base types)

From: kernel test robot
Date: Fri Aug 06 2021 - 15:31:40 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 902e7f373fff2476b53824264c12e4e76c7ec02a
commit: e5fc436f06eef54ef512ea55a9db8eb9f2e76959 sparse: use static inline for __chk_{user,io}_ptr()
date: 11 months ago
config: sh-randconfig-s031-20210806 (attached as .config)
compiler: sh4-linux-gcc (GCC) 10.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.3-348-gf0e6938b-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e5fc436f06eef54ef512ea55a9db8eb9f2e76959
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout e5fc436f06eef54ef512ea55a9db8eb9f2e76959
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=sh

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/sh/kernel/cpu/sh2a/setup-sh7203.c:348:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/kernel/cpu/sh2a/setup-sh7203.c:348:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh2a/setup-sh7203.c:348:9: sparse: got unsigned int
>> arch/sh/kernel/cpu/sh2a/setup-sh7203.c:348:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/kernel/cpu/sh2a/setup-sh7203.c:348:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh2a/setup-sh7203.c:348:9: sparse: got unsigned int
arch/sh/kernel/cpu/sh2a/setup-sh7203.c:351:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/kernel/cpu/sh2a/setup-sh7203.c:351:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh2a/setup-sh7203.c:351:9: sparse: got unsigned int
arch/sh/kernel/cpu/sh2a/setup-sh7203.c:351:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/kernel/cpu/sh2a/setup-sh7203.c:351:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh2a/setup-sh7203.c:351:9: sparse: got unsigned int
--
>> arch/sh/kernel/cpu/sh2a/clock-sh7203.c:29:32: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/kernel/cpu/sh2a/clock-sh7203.c:29:32: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh2a/clock-sh7203.c:29:32: sparse: got unsigned int
arch/sh/kernel/cpu/sh2a/clock-sh7203.c:38:20: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/kernel/cpu/sh2a/clock-sh7203.c:38:20: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh2a/clock-sh7203.c:38:20: sparse: got unsigned int
arch/sh/kernel/cpu/sh2a/clock-sh7203.c:48:20: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/kernel/cpu/sh2a/clock-sh7203.c:48:20: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh2a/clock-sh7203.c:48:20: sparse: got unsigned int

vim +348 arch/sh/kernel/cpu/sh2a/setup-sh7203.c

698aa99da5f5e2 Magnus Damm 2009-04-30 344
698aa99da5f5e2 Magnus Damm 2009-04-30 345 void __init plat_early_device_setup(void)
698aa99da5f5e2 Magnus Damm 2009-04-30 346 {
698aa99da5f5e2 Magnus Damm 2009-04-30 347 /* enable CMT clock */
698aa99da5f5e2 Magnus Damm 2009-04-30 @348 __raw_writeb(__raw_readb(STBCR4) & ~0x04, STBCR4);

:::::: The code at line 348 was first introduced by commit
:::::: 698aa99da5f5e2b4c666fd21ab77306f0225b8f5 sh: sh2/sh2a 16-bit CMT platform data

:::::: TO: Magnus Damm <damm@xxxxxxxxxx>
:::::: CC: Paul Mundt <lethal@xxxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip