All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: drivers/scsi/pcmcia/nsp_io.h:231:24: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Mon, 07 Sep 2020 10:42:25 +0800	[thread overview]
Message-ID: <202009071012.R3qOU4Bd%lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 7210 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f4d51dffc6c01a9e94650d95ce0104964f8ae822
commit: e5fc436f06eef54ef512ea55a9db8eb9f2e76959 sparse: use static inline for __chk_{user,io}_ptr()
date:   9 days ago
config: sh-randconfig-s031-20200907 (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.2-191-g10164920-dirty
        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__' ARCH=sh 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

   drivers/scsi/pcmcia/nsp_cs.c: note: in included file:
>> drivers/scsi/pcmcia/nsp_io.h:231:24: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned long *ptr @@
>> drivers/scsi/pcmcia/nsp_io.h:231:24: sparse:     expected void const volatile [noderef] __iomem *ptr
   drivers/scsi/pcmcia/nsp_io.h:231:24: sparse:     got unsigned long *ptr
   drivers/scsi/pcmcia/nsp_io.h:257:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned long *ptr @@
   drivers/scsi/pcmcia/nsp_io.h:257:17: sparse:     expected void const volatile [noderef] __iomem *ptr
   drivers/scsi/pcmcia/nsp_io.h:257:17: sparse:     got unsigned long *ptr
--
   sound/core/hwdep.c:265:29: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected int const *__gu_addr @@     got int [noderef] __user * @@
   sound/core/hwdep.c:265:29: sparse:     expected int const *__gu_addr
   sound/core/hwdep.c:265:29: sparse:     got int [noderef] __user *
>> sound/core/hwdep.c:265:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __user *ptr @@     got int const *__gu_addr @@
>> sound/core/hwdep.c:265:29: sparse:     expected void const volatile [noderef] __user *ptr
   sound/core/hwdep.c:265:29: sparse:     got int const *__gu_addr
   sound/core/hwdep.c:294:29: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned int const *__gu_addr @@     got unsigned int [noderef] __user * @@
   sound/core/hwdep.c:294:29: sparse:     expected unsigned int const *__gu_addr
   sound/core/hwdep.c:294:29: sparse:     got unsigned int [noderef] __user *
>> sound/core/hwdep.c:294:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __user *ptr @@     got unsigned int const *__gu_addr @@
   sound/core/hwdep.c:294:29: sparse:     expected void const volatile [noderef] __user *ptr
   sound/core/hwdep.c:294:29: sparse:     got unsigned int const *__gu_addr
--
   sound/sh/sh_dac_audio.c:167:51: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *dst @@     got char * @@
   sound/sh/sh_dac_audio.c:167:51: sparse:     expected void volatile [noderef] __iomem *dst
   sound/sh/sh_dac_audio.c:167:51: sparse:     got char *
   sound/sh/sh_dac_audio.c:186:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem * @@     got char * @@
   sound/sh/sh_dac_audio.c:186:39: sparse:     expected void volatile [noderef] __iomem *
   sound/sh/sh_dac_audio.c:186:39: sparse:     got char *
   sound/sh/sh_dac_audio.c:204:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem * @@     got char * @@
   sound/sh/sh_dac_audio.c:204:37: sparse:     expected void volatile [noderef] __iomem *
   sound/sh/sh_dac_audio.c:204:37: sparse:     got char *
   sound/sh/sh_dac_audio.c: note: in included file:
>> arch/sh/include/cpu-sh3/cpu/dac.h:38:21: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int @@
>> arch/sh/include/cpu-sh3/cpu/dac.h:38:21: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/include/cpu-sh3/cpu/dac.h:38:21: sparse:     got unsigned int
   arch/sh/include/cpu-sh3/cpu/dac.h:39:14: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int @@
   arch/sh/include/cpu-sh3/cpu/dac.h:39:14: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/include/cpu-sh3/cpu/dac.h:39:14: sparse:     got unsigned int

# 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
vim +231 drivers/scsi/pcmcia/nsp_io.h

^1da177e4c3f41 Linus Torvalds 2005-04-16  217  
^1da177e4c3f41 Linus Torvalds 2005-04-16  218  /* read 32bit FIFO */
^1da177e4c3f41 Linus Torvalds 2005-04-16  219  static inline void nsp_mmio_multi_read_4(unsigned long  base,
^1da177e4c3f41 Linus Torvalds 2005-04-16  220  					 unsigned int   Register,
^1da177e4c3f41 Linus Torvalds 2005-04-16  221  					 void          *buf,
^1da177e4c3f41 Linus Torvalds 2005-04-16  222  					 unsigned long  count)
^1da177e4c3f41 Linus Torvalds 2005-04-16  223  {
^1da177e4c3f41 Linus Torvalds 2005-04-16  224  	unsigned long *ptr = (unsigned long *)(base + Register);
^1da177e4c3f41 Linus Torvalds 2005-04-16  225  	unsigned long *tmp = (unsigned long *)buf;
^1da177e4c3f41 Linus Torvalds 2005-04-16  226  	int i;
^1da177e4c3f41 Linus Torvalds 2005-04-16  227  
^1da177e4c3f41 Linus Torvalds 2005-04-16  228  	//nsp_dbg(NSP_DEBUG_DATA_IO, "base 0x%0lx ptr 0x%p",base,ptr);
^1da177e4c3f41 Linus Torvalds 2005-04-16  229  
^1da177e4c3f41 Linus Torvalds 2005-04-16  230  	for (i = 0; i < count; i++) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 @231  		*tmp = readl(ptr);
^1da177e4c3f41 Linus Torvalds 2005-04-16  232  		//nsp_dbg(NSP_DEBUG_DATA_IO, "<%d,%p,%p,%lx>", i, ptr, tmp, *tmp);
^1da177e4c3f41 Linus Torvalds 2005-04-16  233  		tmp++;
^1da177e4c3f41 Linus Torvalds 2005-04-16  234  	}
^1da177e4c3f41 Linus Torvalds 2005-04-16  235  }
^1da177e4c3f41 Linus Torvalds 2005-04-16  236  

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

:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 21088 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Subject: drivers/scsi/pcmcia/nsp_io.h:231:24: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Mon, 7 Sep 2020 10:42:25 +0800	[thread overview]
Message-ID: <202009071012.R3qOU4Bd%lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 7113 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f4d51dffc6c01a9e94650d95ce0104964f8ae822
commit: e5fc436f06eef54ef512ea55a9db8eb9f2e76959 sparse: use static inline for __chk_{user,io}_ptr()
date:   9 days ago
config: sh-randconfig-s031-20200907 (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.2-191-g10164920-dirty
        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__' ARCH=sh 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

   drivers/scsi/pcmcia/nsp_cs.c: note: in included file:
>> drivers/scsi/pcmcia/nsp_io.h:231:24: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned long *ptr @@
>> drivers/scsi/pcmcia/nsp_io.h:231:24: sparse:     expected void const volatile [noderef] __iomem *ptr
   drivers/scsi/pcmcia/nsp_io.h:231:24: sparse:     got unsigned long *ptr
   drivers/scsi/pcmcia/nsp_io.h:257:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned long *ptr @@
   drivers/scsi/pcmcia/nsp_io.h:257:17: sparse:     expected void const volatile [noderef] __iomem *ptr
   drivers/scsi/pcmcia/nsp_io.h:257:17: sparse:     got unsigned long *ptr
--
   sound/core/hwdep.c:265:29: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected int const *__gu_addr @@     got int [noderef] __user * @@
   sound/core/hwdep.c:265:29: sparse:     expected int const *__gu_addr
   sound/core/hwdep.c:265:29: sparse:     got int [noderef] __user *
>> sound/core/hwdep.c:265:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __user *ptr @@     got int const *__gu_addr @@
>> sound/core/hwdep.c:265:29: sparse:     expected void const volatile [noderef] __user *ptr
   sound/core/hwdep.c:265:29: sparse:     got int const *__gu_addr
   sound/core/hwdep.c:294:29: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned int const *__gu_addr @@     got unsigned int [noderef] __user * @@
   sound/core/hwdep.c:294:29: sparse:     expected unsigned int const *__gu_addr
   sound/core/hwdep.c:294:29: sparse:     got unsigned int [noderef] __user *
>> sound/core/hwdep.c:294:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __user *ptr @@     got unsigned int const *__gu_addr @@
   sound/core/hwdep.c:294:29: sparse:     expected void const volatile [noderef] __user *ptr
   sound/core/hwdep.c:294:29: sparse:     got unsigned int const *__gu_addr
--
   sound/sh/sh_dac_audio.c:167:51: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *dst @@     got char * @@
   sound/sh/sh_dac_audio.c:167:51: sparse:     expected void volatile [noderef] __iomem *dst
   sound/sh/sh_dac_audio.c:167:51: sparse:     got char *
   sound/sh/sh_dac_audio.c:186:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem * @@     got char * @@
   sound/sh/sh_dac_audio.c:186:39: sparse:     expected void volatile [noderef] __iomem *
   sound/sh/sh_dac_audio.c:186:39: sparse:     got char *
   sound/sh/sh_dac_audio.c:204:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem * @@     got char * @@
   sound/sh/sh_dac_audio.c:204:37: sparse:     expected void volatile [noderef] __iomem *
   sound/sh/sh_dac_audio.c:204:37: sparse:     got char *
   sound/sh/sh_dac_audio.c: note: in included file:
>> arch/sh/include/cpu-sh3/cpu/dac.h:38:21: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int @@
>> arch/sh/include/cpu-sh3/cpu/dac.h:38:21: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/include/cpu-sh3/cpu/dac.h:38:21: sparse:     got unsigned int
   arch/sh/include/cpu-sh3/cpu/dac.h:39:14: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int @@
   arch/sh/include/cpu-sh3/cpu/dac.h:39:14: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/include/cpu-sh3/cpu/dac.h:39:14: sparse:     got unsigned int

# 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
vim +231 drivers/scsi/pcmcia/nsp_io.h

^1da177e4c3f41 Linus Torvalds 2005-04-16  217  
^1da177e4c3f41 Linus Torvalds 2005-04-16  218  /* read 32bit FIFO */
^1da177e4c3f41 Linus Torvalds 2005-04-16  219  static inline void nsp_mmio_multi_read_4(unsigned long  base,
^1da177e4c3f41 Linus Torvalds 2005-04-16  220  					 unsigned int   Register,
^1da177e4c3f41 Linus Torvalds 2005-04-16  221  					 void          *buf,
^1da177e4c3f41 Linus Torvalds 2005-04-16  222  					 unsigned long  count)
^1da177e4c3f41 Linus Torvalds 2005-04-16  223  {
^1da177e4c3f41 Linus Torvalds 2005-04-16  224  	unsigned long *ptr = (unsigned long *)(base + Register);
^1da177e4c3f41 Linus Torvalds 2005-04-16  225  	unsigned long *tmp = (unsigned long *)buf;
^1da177e4c3f41 Linus Torvalds 2005-04-16  226  	int i;
^1da177e4c3f41 Linus Torvalds 2005-04-16  227  
^1da177e4c3f41 Linus Torvalds 2005-04-16  228  	//nsp_dbg(NSP_DEBUG_DATA_IO, "base 0x%0lx ptr 0x%p",base,ptr);
^1da177e4c3f41 Linus Torvalds 2005-04-16  229  
^1da177e4c3f41 Linus Torvalds 2005-04-16  230  	for (i = 0; i < count; i++) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 @231  		*tmp = readl(ptr);
^1da177e4c3f41 Linus Torvalds 2005-04-16  232  		//nsp_dbg(NSP_DEBUG_DATA_IO, "<%d,%p,%p,%lx>", i, ptr, tmp, *tmp);
^1da177e4c3f41 Linus Torvalds 2005-04-16  233  		tmp++;
^1da177e4c3f41 Linus Torvalds 2005-04-16  234  	}
^1da177e4c3f41 Linus Torvalds 2005-04-16  235  }
^1da177e4c3f41 Linus Torvalds 2005-04-16  236  

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

:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 21088 bytes --]

             reply	other threads:[~2020-09-07  2:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-07  2:42 kernel test robot [this message]
2020-09-07  2:42 ` drivers/scsi/pcmcia/nsp_io.h:231:24: sparse: sparse: incorrect type in argument 1 (different address spaces) kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202009071012.R3qOU4Bd%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.