drivers/ide/falconide.c:67:17: sparse: sparse: incorrect type in argument 1 (different address spaces)

From: kernel test robot
Date: Mon Aug 24 2020 - 05:51:53 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d012a7190fc1fd72ed48911e77ca97ba4521bccd
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 10 weeks ago
config: m68k-randconfig-s032-20200824 (attached as .config)
compiler: m68k-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-191-g10164920-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=m68k

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/ide/falconide.c:67:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned short volatile [noderef] [usertype] __iomem *port @@ got unsigned short [usertype] * @@
>> drivers/ide/falconide.c:67:17: sparse: expected unsigned short volatile [noderef] [usertype] __iomem *port
drivers/ide/falconide.c:67:17: sparse: got unsigned short [usertype] *
drivers/ide/falconide.c:71:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned short volatile [noderef] [usertype] __iomem *port @@ got unsigned short [usertype] * @@
drivers/ide/falconide.c:71:25: sparse: expected unsigned short volatile [noderef] [usertype] __iomem *port
drivers/ide/falconide.c:71:25: sparse: got unsigned short [usertype] *
drivers/ide/falconide.c:80:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned short volatile [noderef] [usertype] __iomem *port @@ got unsigned short [usertype] * @@
drivers/ide/falconide.c:80:17: sparse: expected unsigned short volatile [noderef] [usertype] __iomem *port
drivers/ide/falconide.c:80:17: sparse: got unsigned short [usertype] *
drivers/ide/falconide.c:84:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned short volatile [noderef] [usertype] __iomem *port @@ got unsigned short [usertype] * @@
drivers/ide/falconide.c:84:26: sparse: expected unsigned short volatile [noderef] [usertype] __iomem *port
drivers/ide/falconide.c:84:26: sparse: got unsigned short [usertype] *

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=670d0a4b10704667765f7d18f7592993d02783aa
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 670d0a4b10704667765f7d18f7592993d02783aa
vim +67 drivers/ide/falconide.c

^1da177e4c3f41 drivers/ide/legacy/falconide.c Linus Torvalds 2005-04-16 60
adb1af9803d167 drivers/ide/falconide.c Bartlomiej Zolnierkiewicz 2009-03-27 61 static void falconide_input_data(ide_drive_t *drive, struct ide_cmd *cmd,
9567b349f7e7dd drivers/ide/legacy/falconide.c Bartlomiej Zolnierkiewicz 2008-04-28 62 void *buf, unsigned int len)
92d3ab27e8fd23 drivers/ide/legacy/falconide.c Bartlomiej Zolnierkiewicz 2008-04-28 63 {
9567b349f7e7dd drivers/ide/legacy/falconide.c Bartlomiej Zolnierkiewicz 2008-04-28 64 unsigned long data_addr = drive->hwif->io_ports.data_addr;
92d3ab27e8fd23 drivers/ide/legacy/falconide.c Bartlomiej Zolnierkiewicz 2008-04-28 65
d18812070efc65 drivers/ide/falconide.c Geert Uytterhoeven 2009-04-08 66 if (drive->media == ide_disk && cmd && (cmd->tf_flags & IDE_TFLAG_FS)) {
d18812070efc65 drivers/ide/falconide.c Geert Uytterhoeven 2009-04-08 @67 __ide_mm_insw(data_addr, buf, (len + 1) / 2);
d18812070efc65 drivers/ide/falconide.c Geert Uytterhoeven 2009-04-08 68 return;
d18812070efc65 drivers/ide/falconide.c Geert Uytterhoeven 2009-04-08 69 }
92d3ab27e8fd23 drivers/ide/legacy/falconide.c Bartlomiej Zolnierkiewicz 2008-04-28 70
f94116aeec7a29 drivers/ide/falconide.c Bartlomiej Zolnierkiewicz 2009-03-27 71 raw_insw_swapw((u16 *)data_addr, buf, (len + 1) / 2);
92d3ab27e8fd23 drivers/ide/legacy/falconide.c Bartlomiej Zolnierkiewicz 2008-04-28 72 }
92d3ab27e8fd23 drivers/ide/legacy/falconide.c Bartlomiej Zolnierkiewicz 2008-04-28 73

:::::: The code at line 67 was first introduced by commit
:::::: d18812070efc658267f7573eec5ce7810128bfeb ide: falconide/q40ide - Use __ide_mm_{in,out}sw() for data

:::::: TO: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
:::::: CC: Bartlomiej Zolnierkiewicz <bzolnier@xxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip