drivers/scsi/vmw_pvscsi.c:212:39: sparse: sparse: incorrect type in argument 2 (different address spaces)

From: kernel test robot
Date: Sun Jun 28 2020 - 00:09:20 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 916a3b0fc1206f7e7ae8d00a21a3114b1dc67794
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 9 days ago
config: x86_64-randconfig-s031-20200628 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-dirty
git checkout 670d0a4b10704667765f7d18f7592993d02783aa
# save the attached .config to linux build tree
make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

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/scsi/vmw_pvscsi.c:212:39: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got char * @@
>> drivers/scsi/vmw_pvscsi.c:212:39: sparse: expected void volatile [noderef] __iomem *addr
drivers/scsi/vmw_pvscsi.c:212:39: sparse: got char *
>> drivers/scsi/vmw_pvscsi.c:217:40: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got char * @@
>> drivers/scsi/vmw_pvscsi.c:217:40: sparse: expected void const volatile [noderef] __iomem *addr
drivers/scsi/vmw_pvscsi.c:217:40: sparse: got char *
>> drivers/scsi/vmw_pvscsi.c:1224:50: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got char *mmioBase @@
>> drivers/scsi/vmw_pvscsi.c:1224:50: sparse: expected void [noderef] __iomem *
drivers/scsi/vmw_pvscsi.c:1224:50: sparse: got char *mmioBase
>> drivers/scsi/vmw_pvscsi.c:1403:27: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected char *mmioBase @@ got void [noderef] __iomem * @@
drivers/scsi/vmw_pvscsi.c:1403:27: sparse: expected char *mmioBase
>> drivers/scsi/vmw_pvscsi.c:1403:27: sparse: got void [noderef] __iomem *

vim +212 drivers/scsi/vmw_pvscsi.c

851b164231d111 Alok Kataria 2009-10-13 208
851b164231d111 Alok Kataria 2009-10-13 209 static void pvscsi_reg_write(const struct pvscsi_adapter *adapter,
851b164231d111 Alok Kataria 2009-10-13 210 u32 offset, u32 val)
851b164231d111 Alok Kataria 2009-10-13 211 {
851b164231d111 Alok Kataria 2009-10-13 @212 writel(val, adapter->mmioBase + offset);
851b164231d111 Alok Kataria 2009-10-13 213 }
851b164231d111 Alok Kataria 2009-10-13 214
851b164231d111 Alok Kataria 2009-10-13 215 static u32 pvscsi_reg_read(const struct pvscsi_adapter *adapter, u32 offset)
851b164231d111 Alok Kataria 2009-10-13 216 {
851b164231d111 Alok Kataria 2009-10-13 @217 return readl(adapter->mmioBase + offset);
851b164231d111 Alok Kataria 2009-10-13 218 }
851b164231d111 Alok Kataria 2009-10-13 219

:::::: The code at line 212 was first introduced by commit
:::::: 851b164231d1117673aa44c00c7622e48b7dfcf4 [SCSI] vmw_pvscsi: SCSI driver for VMware's virtual HBA.

:::::: TO: Alok Kataria <akataria@xxxxxxxxxx>
:::::: CC: James Bottomley <James.Bottomley@xxxxxxx>

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

Attachment: .config.gz
Description: application/gzip