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

From: kernel test robot
Date: Mon Sep 13 2021 - 23:48:07 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d0ee23f9d78be5531c4b055ea424ed0b489dfe9b
commit: e5fc436f06eef54ef512ea55a9db8eb9f2e76959 sparse: use static inline for __chk_{user,io}_ptr()
date: 1 year, 1 month ago
config: sh-randconfig-s031-20210911 (attached as .config)
compiler: sh4-linux-gcc (GCC) 11.2.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.4-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-11.2.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-sh7264.c:474: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-sh7264.c:474:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh2a/setup-sh7264.c:474:9: sparse: got unsigned int
--
>> arch/sh/kernel/cpu/sh2a/clock-sh7264.c:44:33: 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-sh7264.c:44:33: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh2a/clock-sh7264.c:44:33: sparse: got unsigned int
arch/sh/kernel/cpu/sh2a/clock-sh7264.c:93:20: sparse: sparse: Using plain integer as NULL pointer
arch/sh/kernel/cpu/sh2a/clock-sh7264.c:94:20: sparse: sparse: Using plain integer as NULL pointer
arch/sh/kernel/cpu/sh2a/clock-sh7264.c:95:20: sparse: sparse: Using plain integer as NULL pointer
arch/sh/kernel/cpu/sh2a/clock-sh7264.c:96:20: sparse: sparse: Using plain integer as NULL pointer
arch/sh/kernel/cpu/sh2a/clock-sh7264.c:97:20: sparse: sparse: Using plain integer as NULL pointer
arch/sh/kernel/cpu/sh2a/clock-sh7264.c:98:20: sparse: sparse: Using plain integer as NULL pointer
arch/sh/kernel/cpu/sh2a/clock-sh7264.c:99:20: sparse: sparse: Using plain integer as NULL pointer
arch/sh/kernel/cpu/sh2a/clock-sh7264.c:100:20: sparse: sparse: Using plain integer as NULL pointer
arch/sh/kernel/cpu/sh2a/clock-sh7264.c:101:20: sparse: sparse: Using plain integer as NULL pointer

vim +474 arch/sh/kernel/cpu/sh2a/setup-sh7264.c

51ce30684e0d1a Phil Edworthy 2012-05-09 470
51ce30684e0d1a Phil Edworthy 2012-05-09 471 /* USB Host */
51ce30684e0d1a Phil Edworthy 2012-05-09 472 static void usb_port_power(int port, int power)
51ce30684e0d1a Phil Edworthy 2012-05-09 473 {
51ce30684e0d1a Phil Edworthy 2012-05-09 @474 __raw_writew(0x200 , 0xffffc0c2) ; /* Initialise UACS25 */
51ce30684e0d1a Phil Edworthy 2012-05-09 475 }
51ce30684e0d1a Phil Edworthy 2012-05-09 476

:::::: The code at line 474 was first introduced by commit
:::::: 51ce30684e0d1ae50a154e1026de57d15d096286 sh: Add sh7264 device

:::::: TO: Phil Edworthy <phil.edworthy@xxxxxxxxxxx>
:::::: 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