lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202208192329.JUNECsdd-lkp@intel.com>
Date:   Fri, 19 Aug 2022 23:11:37 +0800
From:   kernel test robot <lkp@...el.com>
To:     Kefeng Wang <wangkefeng.wang@...wei.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Will Deacon <will@...nel.org>, Christoph Hellwig <hch@....de>,
        Arnd Bergmann <arnd@...db.de>,
        "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>
Subject: drivers/scsi/pcmcia/nsp_cs.c:1683:34: sparse: sparse: incorrect type
 in argument 1 (different address spaces)

arch/arm/include/asm/io.h
arch/arm/mm/ioremap.c
arch/arm/mm/nommu.c
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   4c2d0b039c5cc0112206a5b22431b577cb1c57ad
commit: d803336abdbc1bfacdb32b2cf9f4fdbee072b8ee ARM: mm: kill unused runtime hook arch_iounmap()
date:   8 weeks ago
config: arm-randconfig-s051-20220819
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.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.4-39-gce1a6720-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d803336abdbc1bfacdb32b2cf9f4fdbee072b8ee
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout d803336abdbc1bfacdb32b2cf9f4fdbee072b8ee
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash drivers/scsi/pcmcia/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>

sparse warnings: (new ones prefixed by >>)
>> drivers/scsi/pcmcia/nsp_cs.c:1683:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *io_addr @@     got void * @@
   drivers/scsi/pcmcia/nsp_cs.c:1683:34: sparse:     expected void volatile [noderef] __iomem *io_addr
   drivers/scsi/pcmcia/nsp_cs.c:1683:34: sparse:     got void *
   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 *addr @@     got unsigned long *ptr @@
   drivers/scsi/pcmcia/nsp_io.h:231:24: sparse:     expected void const volatile [noderef] __iomem *addr
   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 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got unsigned long *ptr @@
   drivers/scsi/pcmcia/nsp_io.h:257:17: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/scsi/pcmcia/nsp_io.h:257:17: sparse:     got unsigned long *ptr

vim +1683 drivers/scsi/pcmcia/nsp_cs.c

^1da177e4c3f41 Linus Torvalds    2005-04-16  1661  
^1da177e4c3f41 Linus Torvalds    2005-04-16  1662  
fba395eee7d3f3 Dominik Brodowski 2006-03-31  1663  static void nsp_cs_release(struct pcmcia_device *link)
^1da177e4c3f41 Linus Torvalds    2005-04-16  1664  {
^1da177e4c3f41 Linus Torvalds    2005-04-16  1665  	scsi_info_t *info = link->priv;
^1da177e4c3f41 Linus Torvalds    2005-04-16  1666  	nsp_hw_data *data = NULL;
^1da177e4c3f41 Linus Torvalds    2005-04-16  1667  
^1da177e4c3f41 Linus Torvalds    2005-04-16  1668  	if (info->host == NULL) {
^1da177e4c3f41 Linus Torvalds    2005-04-16  1669  		nsp_msg(KERN_DEBUG, "unexpected card release call.");
^1da177e4c3f41 Linus Torvalds    2005-04-16  1670  	} else {
^1da177e4c3f41 Linus Torvalds    2005-04-16  1671  		data = (nsp_hw_data *)info->host->hostdata;
^1da177e4c3f41 Linus Torvalds    2005-04-16  1672  	}
^1da177e4c3f41 Linus Torvalds    2005-04-16  1673  
^1da177e4c3f41 Linus Torvalds    2005-04-16  1674  	nsp_dbg(NSP_DEBUG_INIT, "link=0x%p", link);
^1da177e4c3f41 Linus Torvalds    2005-04-16  1675  
^1da177e4c3f41 Linus Torvalds    2005-04-16  1676  	/* Unlink the device chain */
^1da177e4c3f41 Linus Torvalds    2005-04-16  1677  	if (info->host != NULL) {
^1da177e4c3f41 Linus Torvalds    2005-04-16  1678  		scsi_remove_host(info->host);
^1da177e4c3f41 Linus Torvalds    2005-04-16  1679  	}
^1da177e4c3f41 Linus Torvalds    2005-04-16  1680  
cdb138080b7814 Dominik Brodowski 2010-07-28  1681  	if (resource_size(link->resource[2])) {
^1da177e4c3f41 Linus Torvalds    2005-04-16  1682  		if (data != NULL) {
^1da177e4c3f41 Linus Torvalds    2005-04-16 @1683  			iounmap((void *)(data->MmioAddress));
^1da177e4c3f41 Linus Torvalds    2005-04-16  1684  		}
^1da177e4c3f41 Linus Torvalds    2005-04-16  1685  	}
fba395eee7d3f3 Dominik Brodowski 2006-03-31  1686  	pcmcia_disable_device(link);
5f2a71fcb79956 Dominik Brodowski 2006-01-15  1687  
^1da177e4c3f41 Linus Torvalds    2005-04-16  1688  	if (info->host != NULL) {
^1da177e4c3f41 Linus Torvalds    2005-04-16  1689  		scsi_host_put(info->host);
^1da177e4c3f41 Linus Torvalds    2005-04-16  1690  	}
^1da177e4c3f41 Linus Torvalds    2005-04-16  1691  } /* nsp_cs_release */
^1da177e4c3f41 Linus Torvalds    2005-04-16  1692  

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

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

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (124600 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ