drivers/video/fbdev/chipsfb.c:334:9: sparse: sparse: incorrect type in argument 1 (different address spaces)

From: kernel test robot
Date: Sun Aug 16 2020 - 19:07:19 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 8 weeks ago
config: powerpc64-randconfig-s032-20200817 (attached as .config)
compiler: powerpc-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-180-g49f7e13a-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=powerpc64

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/video/fbdev/chipsfb.c:334:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *s @@ got char [noderef] __iomem *screen_base @@
drivers/video/fbdev/chipsfb.c:334:9: sparse: expected void *s
>> drivers/video/fbdev/chipsfb.c:334:9: sparse: got char [noderef] __iomem *screen_base
--
>> drivers/soc/fsl/qe/usb.c:46:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int volatile [noderef] [usertype] __iomem *addr @@ got restricted __be32 [noderef] __iomem * @@
>> drivers/soc/fsl/qe/usb.c:46:9: sparse: expected unsigned int volatile [noderef] [usertype] __iomem *addr
>> drivers/soc/fsl/qe/usb.c:46:9: sparse: got restricted __be32 [noderef] __iomem *
>> drivers/soc/fsl/qe/usb.c:46:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int const volatile [noderef] [usertype] __iomem *addr @@ got restricted __be32 [noderef] __iomem * @@
>> drivers/soc/fsl/qe/usb.c:46:9: sparse: expected unsigned int const volatile [noderef] [usertype] __iomem *addr
>> drivers/soc/fsl/qe/usb.c:46:9: sparse: got restricted __be32 [noderef] __iomem *

# 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 +334 drivers/video/fbdev/chipsfb.c

^1da177e4c3f41 drivers/video/chipsfb.c Linus Torvalds 2005-04-16 331
48c68c4f1b5424 drivers/video/chipsfb.c Greg Kroah-Hartman 2012-12-21 332 static void init_chips(struct fb_info *p, unsigned long addr)
^1da177e4c3f41 drivers/video/chipsfb.c Linus Torvalds 2005-04-16 333 {
8c8709334cec80 drivers/video/chipsfb.c Benjamin Herrenschmidt 2005-06-27 @334 memset(p->screen_base, 0, 0x100000);
8c8709334cec80 drivers/video/chipsfb.c Benjamin Herrenschmidt 2005-06-27 335
^1da177e4c3f41 drivers/video/chipsfb.c Linus Torvalds 2005-04-16 336 p->fix = chipsfb_fix;
^1da177e4c3f41 drivers/video/chipsfb.c Linus Torvalds 2005-04-16 337 p->fix.smem_start = addr;
^1da177e4c3f41 drivers/video/chipsfb.c Linus Torvalds 2005-04-16 338
^1da177e4c3f41 drivers/video/chipsfb.c Linus Torvalds 2005-04-16 339 p->var = chipsfb_var;
^1da177e4c3f41 drivers/video/chipsfb.c Linus Torvalds 2005-04-16 340
^1da177e4c3f41 drivers/video/chipsfb.c Linus Torvalds 2005-04-16 341 p->fbops = &chipsfb_ops;
^1da177e4c3f41 drivers/video/chipsfb.c Linus Torvalds 2005-04-16 342 p->flags = FBINFO_DEFAULT;
^1da177e4c3f41 drivers/video/chipsfb.c Linus Torvalds 2005-04-16 343
^1da177e4c3f41 drivers/video/chipsfb.c Linus Torvalds 2005-04-16 344 fb_alloc_cmap(&p->cmap, 256, 0);
^1da177e4c3f41 drivers/video/chipsfb.c Linus Torvalds 2005-04-16 345
^1da177e4c3f41 drivers/video/chipsfb.c Linus Torvalds 2005-04-16 346 chips_hw_init();
^1da177e4c3f41 drivers/video/chipsfb.c Linus Torvalds 2005-04-16 347 }
^1da177e4c3f41 drivers/video/chipsfb.c Linus Torvalds 2005-04-16 348

:::::: The code at line 334 was first introduced by commit
:::::: 8c8709334cec803368a432a33e0f2e116d48fe07 [PATCH] ppc32: Remove CONFIG_PMAC_PBOOK

:::::: TO: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
:::::: 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