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]
Date:   Sat, 24 Sep 2022 05:36:35 +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/isdn/hardware/mISDN/hfcmulti.c:1092:26: sparse: sparse:
 incorrect type in argument 1 (different address spaces)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1707c39ae309bf91965aa6f04d63816a090d90a1
commit: d803336abdbc1bfacdb32b2cf9f4fdbee072b8ee ARM: mm: kill unused runtime hook arch_iounmap()
date:   3 months ago
config: arm-randconfig-s031-20220922
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/gpu/drm/ drivers/isdn/hardware/mISDN/

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/isdn/hardware/mISDN/hfcmulti.c:452:17: sparse: sparse: cast from restricted __le32
   drivers/isdn/hardware/mISDN/hfcmulti.c:457:17: sparse: sparse: cast from restricted __le16
   drivers/isdn/hardware/mISDN/hfcmulti.c:472:17: sparse: sparse: cast from restricted __le32
   drivers/isdn/hardware/mISDN/hfcmulti.c:478:17: sparse: sparse: cast from restricted __le16
   drivers/isdn/hardware/mISDN/hfcmulti.c:496:32: sparse: sparse: cast to restricted __le32
   drivers/isdn/hardware/mISDN/hfcmulti.c:501:32: sparse: sparse: cast to restricted __le16
   drivers/isdn/hardware/mISDN/hfcmulti.c:518:25: sparse: sparse: cast to restricted __le32
   drivers/isdn/hardware/mISDN/hfcmulti.c:524:25: sparse: sparse: cast to restricted __le16
>> drivers/isdn/hardware/mISDN/hfcmulti.c:1092:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *io_addr @@     got void * @@
   drivers/isdn/hardware/mISDN/hfcmulti.c:1092:26: sparse:     expected void volatile [noderef] __iomem *io_addr
   drivers/isdn/hardware/mISDN/hfcmulti.c:1092:26: sparse:     got void *
--
   drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c:104:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void * @@
   drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c:104:9: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c:104:9: sparse:     got void *
   drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c:110:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got void * @@
   drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c:110:16: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c:110:16: sparse:     got void *
>> drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c:157:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *io_addr @@     got void *[assigned] emap @@
   drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c:157:25: sparse:     expected void volatile [noderef] __iomem *io_addr
   drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c:157:25: sparse:     got void *[assigned] emap
   drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c:174:19: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void *map @@     got void [noderef] __iomem * @@
   drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c:174:19: sparse:     expected void *map
   drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c:174:19: sparse:     got void [noderef] __iomem *
   drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c:225:28: sparse: sparse: incorrect type in return expression (different address spaces) @@     expected void [noderef] __iomem * @@     got void *map @@
   drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c:225:28: sparse:     expected void [noderef] __iomem *
   drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c:225:28: sparse:     got void *map
   drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c:233:28: sparse: sparse: incorrect type in return expression (different address spaces) @@     expected void [noderef] __iomem * @@     got void *map @@
   drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c:233:28: sparse:     expected void [noderef] __iomem *
   drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c:233:28: sparse:     got void *map
   drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c:240:21: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void [noderef] __iomem *map @@     got void *map @@
   drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c:240:21: sparse:     expected void [noderef] __iomem *map
   drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c:240:21: sparse:     got void *map
>> drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c:327:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *io_addr @@     got void *[assigned] map @@
   drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c:327:25: sparse:     expected void volatile [noderef] __iomem *io_addr
   drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c:327:25: sparse:     got void *[assigned] map

vim +1092 drivers/isdn/hardware/mISDN/hfcmulti.c

af69fb3a8ffa37 Karsten Keil 2008-07-27  1034  
af69fb3a8ffa37 Karsten Keil 2008-07-27  1035  
af69fb3a8ffa37 Karsten Keil 2008-07-27  1036  /*
af69fb3a8ffa37 Karsten Keil 2008-07-27  1037   * free hardware resources used by driver
af69fb3a8ffa37 Karsten Keil 2008-07-27  1038   */
af69fb3a8ffa37 Karsten Keil 2008-07-27  1039  static void
af69fb3a8ffa37 Karsten Keil 2008-07-27  1040  release_io_hfcmulti(struct hfc_multi *hc)
af69fb3a8ffa37 Karsten Keil 2008-07-27  1041  {
c31655fcf2c61f Hannes Eder  2008-12-12  1042  	void __iomem *plx_acc_32;
c31655fcf2c61f Hannes Eder  2008-12-12  1043  	u_int	pv;
af69fb3a8ffa37 Karsten Keil 2008-07-27  1044  	u_long	plx_flags;
af69fb3a8ffa37 Karsten Keil 2008-07-27  1045  
af69fb3a8ffa37 Karsten Keil 2008-07-27  1046  	if (debug & DEBUG_HFCMULTI_INIT)
af69fb3a8ffa37 Karsten Keil 2008-07-27  1047  		printk(KERN_DEBUG "%s: entered\n", __func__);
af69fb3a8ffa37 Karsten Keil 2008-07-27  1048  
af69fb3a8ffa37 Karsten Keil 2008-07-27  1049  	/* soft reset also masks all interrupts */
af69fb3a8ffa37 Karsten Keil 2008-07-27  1050  	hc->hw.r_cirm |= V_SRES;
af69fb3a8ffa37 Karsten Keil 2008-07-27  1051  	HFC_outb(hc, R_CIRM, hc->hw.r_cirm);
af69fb3a8ffa37 Karsten Keil 2008-07-27  1052  	udelay(1000);
af69fb3a8ffa37 Karsten Keil 2008-07-27  1053  	hc->hw.r_cirm &= ~V_SRES;
af69fb3a8ffa37 Karsten Keil 2008-07-27  1054  	HFC_outb(hc, R_CIRM, hc->hw.r_cirm);
af69fb3a8ffa37 Karsten Keil 2008-07-27  1055  	udelay(1000); /* instead of 'wait' that may cause locking */
af69fb3a8ffa37 Karsten Keil 2008-07-27  1056  
af69fb3a8ffa37 Karsten Keil 2008-07-27  1057  	/* release Speech Design card, if PLX was initialized */
af69fb3a8ffa37 Karsten Keil 2008-07-27  1058  	if (test_bit(HFC_CHIP_PLXSD, &hc->chip) && hc->plx_membase) {
af69fb3a8ffa37 Karsten Keil 2008-07-27  1059  		if (debug & DEBUG_HFCMULTI_PLXSD)
af69fb3a8ffa37 Karsten Keil 2008-07-27  1060  			printk(KERN_DEBUG "%s: release PLXSD card %d\n",
af69fb3a8ffa37 Karsten Keil 2008-07-27  1061  			       __func__, hc->id + 1);
af69fb3a8ffa37 Karsten Keil 2008-07-27  1062  		spin_lock_irqsave(&plx_lock, plx_flags);
c31655fcf2c61f Hannes Eder  2008-12-12  1063  		plx_acc_32 = hc->plx_membase + PLX_GPIOC;
af69fb3a8ffa37 Karsten Keil 2008-07-27  1064  		writel(PLX_GPIOC_INIT, plx_acc_32);
af69fb3a8ffa37 Karsten Keil 2008-07-27  1065  		pv = readl(plx_acc_32);
af69fb3a8ffa37 Karsten Keil 2008-07-27  1066  		/* Termination off */
af69fb3a8ffa37 Karsten Keil 2008-07-27  1067  		pv &= ~PLX_TERM_ON;
af69fb3a8ffa37 Karsten Keil 2008-07-27  1068  		/* Disconnect the PCM */
af69fb3a8ffa37 Karsten Keil 2008-07-27  1069  		pv |= PLX_SLAVE_EN_N;
af69fb3a8ffa37 Karsten Keil 2008-07-27  1070  		pv &= ~PLX_MASTER_EN;
af69fb3a8ffa37 Karsten Keil 2008-07-27  1071  		pv &= ~PLX_SYNC_O_EN;
af69fb3a8ffa37 Karsten Keil 2008-07-27  1072  		/* Put the DSP in Reset */
af69fb3a8ffa37 Karsten Keil 2008-07-27  1073  		pv &= ~PLX_DSP_RES_N;
af69fb3a8ffa37 Karsten Keil 2008-07-27  1074  		writel(pv, plx_acc_32);
af69fb3a8ffa37 Karsten Keil 2008-07-27  1075  		if (debug & DEBUG_HFCMULTI_INIT)
eac74af9b547e2 Karsten Keil 2009-05-22  1076  			printk(KERN_DEBUG "%s: PCM off: PLX_GPIO=%x\n",
af69fb3a8ffa37 Karsten Keil 2008-07-27  1077  			       __func__, pv);
af69fb3a8ffa37 Karsten Keil 2008-07-27  1078  		spin_unlock_irqrestore(&plx_lock, plx_flags);
af69fb3a8ffa37 Karsten Keil 2008-07-27  1079  	}
af69fb3a8ffa37 Karsten Keil 2008-07-27  1080  
af69fb3a8ffa37 Karsten Keil 2008-07-27  1081  	/* disable memory mapped ports / io ports */
af69fb3a8ffa37 Karsten Keil 2008-07-27  1082  	test_and_clear_bit(HFC_CHIP_PLXSD, &hc->chip); /* prevent resync */
db9bb63a1b5b65 Karsten Keil 2009-05-22  1083  	if (hc->pci_dev)
af69fb3a8ffa37 Karsten Keil 2008-07-27  1084  		pci_write_config_word(hc->pci_dev, PCI_COMMAND, 0);
af69fb3a8ffa37 Karsten Keil 2008-07-27  1085  	if (hc->pci_membase)
c31655fcf2c61f Hannes Eder  2008-12-12  1086  		iounmap(hc->pci_membase);
af69fb3a8ffa37 Karsten Keil 2008-07-27  1087  	if (hc->plx_membase)
c31655fcf2c61f Hannes Eder  2008-12-12  1088  		iounmap(hc->plx_membase);
af69fb3a8ffa37 Karsten Keil 2008-07-27  1089  	if (hc->pci_iobase)
af69fb3a8ffa37 Karsten Keil 2008-07-27  1090  		release_region(hc->pci_iobase, 8);
db9bb63a1b5b65 Karsten Keil 2009-05-22  1091  	if (hc->xhfc_membase)
db9bb63a1b5b65 Karsten Keil 2009-05-22 @1092  		iounmap((void *)hc->xhfc_membase);
af69fb3a8ffa37 Karsten Keil 2008-07-27  1093  
af69fb3a8ffa37 Karsten Keil 2008-07-27  1094  	if (hc->pci_dev) {
af69fb3a8ffa37 Karsten Keil 2008-07-27  1095  		pci_disable_device(hc->pci_dev);
af69fb3a8ffa37 Karsten Keil 2008-07-27  1096  		pci_set_drvdata(hc->pci_dev, NULL);
af69fb3a8ffa37 Karsten Keil 2008-07-27  1097  	}
af69fb3a8ffa37 Karsten Keil 2008-07-27  1098  	if (debug & DEBUG_HFCMULTI_INIT)
af69fb3a8ffa37 Karsten Keil 2008-07-27  1099  		printk(KERN_DEBUG "%s: done\n", __func__);
af69fb3a8ffa37 Karsten Keil 2008-07-27  1100  }
af69fb3a8ffa37 Karsten Keil 2008-07-27  1101  

:::::: The code at line 1092 was first introduced by commit
:::::: db9bb63a1b5b65df41d112a8c21adbbfc6a4ac08 mISDN: Add XHFC support for embedded Speech-Design board to hfcmulti

:::::: TO: Karsten Keil <keil@...systems.de>
:::::: CC: David S. Miller <davem@...emloft.net>

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ