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 <l...@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 <torva...@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torva...@ppc970.osdl.org>

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

Attachment: .config.gz
Description: application/gzip

Reply via email to