drivers/tty/serial/ip22zilog.c:114:22: sparse: sparse: incorrect type in argument 2 (different address spaces)

From: kernel test robot
Date: Thu Jul 16 2020 - 23:34:03 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 07a56bb875afbe39dabbf6ba7b83783d166863db
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 4 weeks ago
config: mips-randconfig-s032-20200717 (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-49-g707c5017-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 >>)

>> drivers/tty/serial/ip22zilog.c:114:22: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
>> drivers/tty/serial/ip22zilog.c:114:22: sparse: expected void volatile [noderef] __iomem *mem
drivers/tty/serial/ip22zilog.c:114:22: sparse: got unsigned char volatile *
>> drivers/tty/serial/ip22zilog.c:116:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
>> drivers/tty/serial/ip22zilog.c:116:25: sparse: expected void const volatile [noderef] __iomem *mem
drivers/tty/serial/ip22zilog.c:116:25: sparse: got unsigned char volatile *
drivers/tty/serial/ip22zilog.c:125:22: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
drivers/tty/serial/ip22zilog.c:125:22: sparse: expected void volatile [noderef] __iomem *mem
drivers/tty/serial/ip22zilog.c:125:22: sparse: got unsigned char volatile *
drivers/tty/serial/ip22zilog.c:127:24: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
drivers/tty/serial/ip22zilog.c:127:24: sparse: expected void volatile [noderef] __iomem *mem
drivers/tty/serial/ip22zilog.c:127:24: sparse: got unsigned char volatile *
drivers/tty/serial/ip22zilog.c:138:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
drivers/tty/serial/ip22zilog.c:138:33: sparse: expected void const volatile [noderef] __iomem *mem
drivers/tty/serial/ip22zilog.c:138:33: sparse: got unsigned char volatile *
drivers/tty/serial/ip22zilog.c:144:24: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
drivers/tty/serial/ip22zilog.c:144:24: sparse: expected void const volatile [noderef] __iomem *mem
drivers/tty/serial/ip22zilog.c:144:24: sparse: got unsigned char volatile *
drivers/tty/serial/ip22zilog.c:148:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
drivers/tty/serial/ip22zilog.c:148:42: sparse: expected void volatile [noderef] __iomem *mem
drivers/tty/serial/ip22zilog.c:148:42: sparse: got unsigned char volatile *
drivers/tty/serial/ip22zilog.c:170:26: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
drivers/tty/serial/ip22zilog.c:170:26: sparse: expected void volatile [noderef] __iomem *mem
drivers/tty/serial/ip22zilog.c:170:26: sparse: got unsigned char volatile *
drivers/tty/serial/ip22zilog.c:256:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
drivers/tty/serial/ip22zilog.c:256:29: sparse: expected void const volatile [noderef] __iomem *mem
drivers/tty/serial/ip22zilog.c:256:29: sparse: got unsigned char volatile *
drivers/tty/serial/ip22zilog.c:263:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
drivers/tty/serial/ip22zilog.c:263:42: sparse: expected void volatile [noderef] __iomem *mem
drivers/tty/serial/ip22zilog.c:263:42: sparse: got unsigned char volatile *
drivers/tty/serial/ip22zilog.c:268:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
drivers/tty/serial/ip22zilog.c:268:29: sparse: expected void const volatile [noderef] __iomem *mem
drivers/tty/serial/ip22zilog.c:268:29: sparse: got unsigned char volatile *
drivers/tty/serial/ip22zilog.c:318:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
drivers/tty/serial/ip22zilog.c:318:25: sparse: expected void const volatile [noderef] __iomem *mem
drivers/tty/serial/ip22zilog.c:318:25: sparse: got unsigned char volatile *
drivers/tty/serial/ip22zilog.c:321:30: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
drivers/tty/serial/ip22zilog.c:321:30: sparse: expected void volatile [noderef] __iomem *mem
drivers/tty/serial/ip22zilog.c:321:30: sparse: got unsigned char volatile *
drivers/tty/serial/ip22zilog.c:361:47: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
drivers/tty/serial/ip22zilog.c:361:47: sparse: expected void const volatile [noderef] __iomem *mem
drivers/tty/serial/ip22zilog.c:361:47: sparse: got unsigned char volatile *
drivers/tty/serial/ip22zilog.c:390:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
drivers/tty/serial/ip22zilog.c:390:42: sparse: expected void volatile [noderef] __iomem *mem
drivers/tty/serial/ip22zilog.c:390:42: sparse: got unsigned char volatile *
drivers/tty/serial/ip22zilog.c:408:40: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
drivers/tty/serial/ip22zilog.c:408:40: sparse: expected void volatile [noderef] __iomem *mem
drivers/tty/serial/ip22zilog.c:408:40: sparse: got unsigned char volatile *
drivers/tty/serial/ip22zilog.c:421:27: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
drivers/tty/serial/ip22zilog.c:421:27: sparse: expected void volatile [noderef] __iomem *mem
drivers/tty/serial/ip22zilog.c:421:27: sparse: got unsigned char volatile *
>> drivers/tty/serial/ip22zilog.c:432:27: sparse: sparse: cast removes address space '__iomem' of expression
drivers/tty/serial/ip22zilog.c:441:44: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
drivers/tty/serial/ip22zilog.c:441:44: sparse: expected void volatile [noderef] __iomem *mem
drivers/tty/serial/ip22zilog.c:441:44: sparse: got unsigned char volatile *
drivers/tty/serial/ip22zilog.c:459:27: sparse: sparse: cast removes address space '__iomem' of expression
drivers/tty/serial/ip22zilog.c:464:44: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
drivers/tty/serial/ip22zilog.c:464:44: sparse: expected void volatile [noderef] __iomem *mem
drivers/tty/serial/ip22zilog.c:464:44: sparse: got unsigned char volatile *
drivers/tty/serial/ip22zilog.c:546:41: sparse: sparse: cast removes address space '__iomem' of expression
drivers/tty/serial/ip22zilog.c:580:41: sparse: sparse: cast removes address space '__iomem' of expression
drivers/tty/serial/ip22zilog.c:586:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
drivers/tty/serial/ip22zilog.c:586:25: sparse: expected void const volatile [noderef] __iomem *mem
drivers/tty/serial/ip22zilog.c:586:25: sparse: got unsigned char volatile *
drivers/tty/serial/ip22zilog.c:597:39: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
drivers/tty/serial/ip22zilog.c:597:39: sparse: expected void volatile [noderef] __iomem *mem
drivers/tty/serial/ip22zilog.c:597:39: sparse: got unsigned char volatile *
drivers/tty/serial/ip22zilog.c:608:48: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
drivers/tty/serial/ip22zilog.c:608:48: sparse: expected void volatile [noderef] __iomem *mem
drivers/tty/serial/ip22zilog.c:608:48: sparse: got unsigned char volatile *
drivers/tty/serial/ip22zilog.c:629:19: sparse: sparse: cast removes address space '__iomem' of expression
drivers/tty/serial/ip22zilog.c:641:41: sparse: sparse: cast removes address space '__iomem' of expression
drivers/tty/serial/ip22zilog.c:658:41: sparse: sparse: cast removes address space '__iomem' of expression
drivers/tty/serial/ip22zilog.c:691:19: sparse: sparse: cast removes address space '__iomem' of expression
drivers/tty/serial/ip22zilog.c:701:27: sparse: sparse: cast removes address space '__iomem' of expression
drivers/tty/serial/ip22zilog.c:715:19: sparse: sparse: cast removes address space '__iomem' of expression
drivers/tty/serial/ip22zilog.c:722:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
drivers/tty/serial/ip22zilog.c:722:34: sparse: expected void const volatile [noderef] __iomem *mem
drivers/tty/serial/ip22zilog.c:722:34: sparse: got unsigned char volatile *
drivers/tty/serial/ip22zilog.c:782:19: sparse: sparse: cast removes address space '__iomem' of expression
drivers/tty/serial/ip22zilog.c:896:41: sparse: sparse: cast removes address space '__iomem' of expression
drivers/tty/serial/ip22zilog.c:995:41: sparse: sparse: cast removes address space '__iomem' of expression
drivers/tty/serial/ip22zilog.c:1002:44: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
drivers/tty/serial/ip22zilog.c:1002:44: sparse: expected void const volatile [noderef] __iomem *mem
drivers/tty/serial/ip22zilog.c:1002:44: sparse: got unsigned char volatile *
drivers/tty/serial/ip22zilog.c:1010:21: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
drivers/tty/serial/ip22zilog.c:1010:21: sparse: expected void volatile [noderef] __iomem *mem
drivers/tty/serial/ip22zilog.c:1010:21: sparse: got unsigned char volatile *
>> drivers/tty/serial/ip22zilog.c:1100:57: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected unsigned char [noderef] __iomem *membase @@ got char * @@
>> drivers/tty/serial/ip22zilog.c:1100:57: sparse: expected unsigned char [noderef] __iomem *membase
drivers/tty/serial/ip22zilog.c:1100:57: sparse: got char *
drivers/tty/serial/ip22zilog.c:1101:57: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected unsigned char [noderef] __iomem *membase @@ got char * @@
drivers/tty/serial/ip22zilog.c:1101:57: sparse: expected unsigned char [noderef] __iomem *membase
drivers/tty/serial/ip22zilog.c:1101:57: sparse: got char *
>> drivers/tty/serial/ip22zilog.c:1205:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@
>> drivers/tty/serial/ip22zilog.c:1205:29: sparse: expected void const volatile [noderef] __iomem *addr
drivers/tty/serial/ip22zilog.c:1205:29: sparse: got void *
drivers/tty/serial/ip22zilog.c:1209:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@
drivers/tty/serial/ip22zilog.c:1209:34: sparse: expected void const volatile [noderef] __iomem *addr
drivers/tty/serial/ip22zilog.c:1209:34: sparse: got void *
drivers/tty/serial/ip22zilog.c:494:19: sparse: sparse: cast removes address space '__iomem' of expression
drivers/tty/serial/ip22zilog.c:495:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
drivers/tty/serial/ip22zilog.c:495:25: sparse: expected void const volatile [noderef] __iomem *mem
drivers/tty/serial/ip22zilog.c:495:25: sparse: got unsigned char volatile *
drivers/tty/serial/ip22zilog.c:494:19: sparse: sparse: cast removes address space '__iomem' of expression
drivers/tty/serial/ip22zilog.c:495:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
drivers/tty/serial/ip22zilog.c:495:25: sparse: expected void const volatile [noderef] __iomem *mem
drivers/tty/serial/ip22zilog.c:495:25: sparse: got unsigned char volatile *

vim +114 drivers/tty/serial/ip22zilog.c

^1da177e4c3f41 drivers/serial/ip22zilog.c Linus Torvalds 2005-04-16 100
^1da177e4c3f41 drivers/serial/ip22zilog.c Linus Torvalds 2005-04-16 101 /* Reading and writing Zilog8530 registers. The delays are to make this
^1da177e4c3f41 drivers/serial/ip22zilog.c Linus Torvalds 2005-04-16 102 * driver work on the IP22 which needs a settling delay after each chip
^1da177e4c3f41 drivers/serial/ip22zilog.c Linus Torvalds 2005-04-16 103 * register access, other machines handle this in hardware via auxiliary
^1da177e4c3f41 drivers/serial/ip22zilog.c Linus Torvalds 2005-04-16 104 * flip-flops which implement the settle time we do in software.
^1da177e4c3f41 drivers/serial/ip22zilog.c Linus Torvalds 2005-04-16 105 *
^1da177e4c3f41 drivers/serial/ip22zilog.c Linus Torvalds 2005-04-16 106 * The port lock must be held and local IRQs must be disabled
^1da177e4c3f41 drivers/serial/ip22zilog.c Linus Torvalds 2005-04-16 107 * when {read,write}_zsreg is invoked.
^1da177e4c3f41 drivers/serial/ip22zilog.c Linus Torvalds 2005-04-16 108 */
^1da177e4c3f41 drivers/serial/ip22zilog.c Linus Torvalds 2005-04-16 109 static unsigned char read_zsreg(struct zilog_channel *channel,
^1da177e4c3f41 drivers/serial/ip22zilog.c Linus Torvalds 2005-04-16 110 unsigned char reg)
^1da177e4c3f41 drivers/serial/ip22zilog.c Linus Torvalds 2005-04-16 111 {
^1da177e4c3f41 drivers/serial/ip22zilog.c Linus Torvalds 2005-04-16 112 unsigned char retval;
^1da177e4c3f41 drivers/serial/ip22zilog.c Linus Torvalds 2005-04-16 113
^1da177e4c3f41 drivers/serial/ip22zilog.c Linus Torvalds 2005-04-16 @114 writeb(reg, &channel->control);
^1da177e4c3f41 drivers/serial/ip22zilog.c Linus Torvalds 2005-04-16 115 ZSDELAY();
^1da177e4c3f41 drivers/serial/ip22zilog.c Linus Torvalds 2005-04-16 @116 retval = readb(&channel->control);
^1da177e4c3f41 drivers/serial/ip22zilog.c Linus Torvalds 2005-04-16 117 ZSDELAY();
^1da177e4c3f41 drivers/serial/ip22zilog.c Linus Torvalds 2005-04-16 118
^1da177e4c3f41 drivers/serial/ip22zilog.c Linus Torvalds 2005-04-16 119 return retval;
^1da177e4c3f41 drivers/serial/ip22zilog.c Linus Torvalds 2005-04-16 120 }
^1da177e4c3f41 drivers/serial/ip22zilog.c Linus Torvalds 2005-04-16 121

:::::: The code at line 114 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip