arch/sh/boards/mach-rsk/devices-rsk7203.c:131:9: sparse: sparse: incorrect type in argument 1 (different base types)

From: kernel test robot
Date: Thu May 20 2021 - 11:40:13 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c3d0e3fd41b7f0f5d5d5b6022ab7e813f04ea727
commit: e5fc436f06eef54ef512ea55a9db8eb9f2e76959 sparse: use static inline for __chk_{user,io}_ptr()
date: 9 months ago
config: sh-randconfig-s032-20210520 (attached as .config)
compiler: sh4-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.3-341-g8af24329-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-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 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/boards/mach-rsk/devices-rsk7203.c:131:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/boards/mach-rsk/devices-rsk7203.c:131:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/mach-rsk/devices-rsk7203.c:131:9: sparse: got unsigned int

vim +131 arch/sh/boards/mach-rsk/devices-rsk7203.c

3787aa112c653b arch/sh/boards/renesas/rsk7203/setup.c Paul Mundt 2008-05-19 123
3787aa112c653b arch/sh/boards/renesas/rsk7203/setup.c Paul Mundt 2008-05-19 124 static int __init rsk7203_devices_setup(void)
3787aa112c653b arch/sh/boards/renesas/rsk7203/setup.c Paul Mundt 2008-05-19 125 {
7a5c679b52d064 arch/sh/boards/board-rsk7203.c Magnus Damm 2008-10-08 126 /* Select pins for SCIF0 */
7a5c679b52d064 arch/sh/boards/board-rsk7203.c Magnus Damm 2008-10-08 127 gpio_request(GPIO_FN_TXD0, NULL);
7a5c679b52d064 arch/sh/boards/board-rsk7203.c Magnus Damm 2008-10-08 128 gpio_request(GPIO_FN_RXD0, NULL);
7a5c679b52d064 arch/sh/boards/board-rsk7203.c Magnus Damm 2008-10-08 129
724cfb944007b7 arch/sh/boards/mach-rsk/devices-rsk7203.c Magnus Damm 2009-04-28 130 /* Setup LAN9118: CS1 in 16-bit Big Endian Mode, IRQ0 at Port B */
9d56dd3b083a3b arch/sh/boards/mach-rsk/devices-rsk7203.c Paul Mundt 2010-01-26 @131 __raw_writel(0x36db0400, 0xfffc0008); /* CS1BCR */

:::::: The code at line 131 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, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip