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: <202102080342.BhVgUdMc-lkp@intel.com>
Date:   Mon, 8 Feb 2021 03:13:59 +0800
From:   kernel test robot <lkp@...el.com>
To:     Krzysztof Kozlowski <krzk@...nel.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linux Memory Management List <linux-mm@...ck.org>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        Arnd Bergmann <arnd@...db.de>
Subject: drivers/net/ethernet/renesas/sh_eth.c:885:37: 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:   61556703b610a104de324e4f061dc6cf7b218b46
commit: 8f28ca6bd8211214faf717677bbffe375c2a6072 iomap: constify ioreadX() iomem argument (as in generic implementation)
date:   6 months ago
config: m68k-randconfig-s032-20210207 (attached as .config)
compiler: m68k-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.3-215-g0fb77bb6-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8f28ca6bd8211214faf717677bbffe375c2a6072
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 8f28ca6bd8211214faf717677bbffe375c2a6072
        # 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=m68k 

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


"sparse warnings: (new ones prefixed by >>)"
>> drivers/net/ethernet/renesas/sh_eth.c:885:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got void * @@
   drivers/net/ethernet/renesas/sh_eth.c:885:37: sparse:     expected void const [noderef] __iomem *
   drivers/net/ethernet/renesas/sh_eth.c:885:37: sparse:     got void *
   drivers/net/ethernet/renesas/sh_eth.c:886:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got void * @@
   drivers/net/ethernet/renesas/sh_eth.c:886:37: sparse:     expected void const [noderef] __iomem *
   drivers/net/ethernet/renesas/sh_eth.c:886:37: sparse:     got void *
   drivers/net/ethernet/renesas/sh_eth.c:893:37: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void * @@
   drivers/net/ethernet/renesas/sh_eth.c:893:37: sparse:     expected void [noderef] __iomem *
   drivers/net/ethernet/renesas/sh_eth.c:893:37: sparse:     got void *
   drivers/net/ethernet/renesas/sh_eth.c:894:37: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void * @@
   drivers/net/ethernet/renesas/sh_eth.c:894:37: sparse:     expected void [noderef] __iomem *
   drivers/net/ethernet/renesas/sh_eth.c:894:37: sparse:     got void *
>> drivers/net/ethernet/renesas/sh_eth.c:1167:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got void *addr @@
   drivers/net/ethernet/renesas/sh_eth.c:1167:31: sparse:     expected void const [noderef] __iomem *
   drivers/net/ethernet/renesas/sh_eth.c:1167:31: sparse:     got void *addr
   drivers/net/ethernet/renesas/sh_eth.c:1172:31: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *addr @@
   drivers/net/ethernet/renesas/sh_eth.c:1172:31: sparse:     expected void [noderef] __iomem *
   drivers/net/ethernet/renesas/sh_eth.c:1172:31: sparse:     got void *addr
   drivers/net/ethernet/renesas/sh_eth.c:1195:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got void *addr @@
   drivers/net/ethernet/renesas/sh_eth.c:1195:33: sparse:     expected void const [noderef] __iomem *
   drivers/net/ethernet/renesas/sh_eth.c:1195:33: sparse:     got void *addr
   drivers/net/ethernet/renesas/sh_eth.c:1225:43: sparse: sparse: restricted __le32 degrades to integer
   drivers/net/ethernet/renesas/sh_eth.c:1230:17: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1230:17: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1230:17: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1230:17: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1230:17: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1230:17: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1235:25: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1235:25: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1235:25: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1235:25: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1235:25: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1235:25: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1235:25: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1235:25: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1235:25: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1235:25: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1235:25: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1235:25: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1243:32: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] status @@     got restricted __le32 [usertype] @@
   drivers/net/ethernet/renesas/sh_eth.c:1243:32: sparse:     expected unsigned int [usertype] status
   drivers/net/ethernet/renesas/sh_eth.c:1243:32: sparse:     got restricted __le32 [usertype]
   drivers/net/ethernet/renesas/sh_eth.c:1245:40: sparse: sparse: invalid assignment: |=
   drivers/net/ethernet/renesas/sh_eth.c:1245:40: sparse:    left side has type unsigned int
   drivers/net/ethernet/renesas/sh_eth.c:1245:40: sparse:    right side has type restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1249:49: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1249:49: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1249:49: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1249:49: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1249:49: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1249:49: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1266:33: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1266:33: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1266:33: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1266:33: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1266:33: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1266:33: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1342:29: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] len @@     got restricted __le32 [usertype] @@
   drivers/net/ethernet/renesas/sh_eth.c:1342:29: sparse:     expected unsigned int [usertype] len
   drivers/net/ethernet/renesas/sh_eth.c:1342:29: sparse:     got restricted __le32 [usertype]
   drivers/net/ethernet/renesas/sh_eth.c:1343:30: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] addr @@     got restricted __le32 [usertype] @@
   drivers/net/ethernet/renesas/sh_eth.c:1343:30: sparse:     expected unsigned int [usertype] addr
   drivers/net/ethernet/renesas/sh_eth.c:1343:30: sparse:     got restricted __le32 [usertype]
   drivers/net/ethernet/renesas/sh_eth.c:1344:32: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] status @@     got restricted __le32 [usertype] @@
   drivers/net/ethernet/renesas/sh_eth.c:1344:32: sparse:     expected unsigned int [usertype] status
   drivers/net/ethernet/renesas/sh_eth.c:1344:32: sparse:     got restricted __le32 [usertype]
   drivers/net/ethernet/renesas/sh_eth.c:1358:32: sparse: sparse: invalid assignment: |=
   drivers/net/ethernet/renesas/sh_eth.c:1358:32: sparse:    left side has type unsigned int
   drivers/net/ethernet/renesas/sh_eth.c:1358:32: sparse:    right side has type restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1366:32: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] status @@     got restricted __le32 [usertype] @@
   drivers/net/ethernet/renesas/sh_eth.c:1366:32: sparse:     expected unsigned int [usertype] status
   drivers/net/ethernet/renesas/sh_eth.c:1366:32: sparse:     got restricted __le32 [usertype]
   drivers/net/ethernet/renesas/sh_eth.c:1367:29: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] len @@     got restricted __le32 [usertype] @@
   drivers/net/ethernet/renesas/sh_eth.c:1367:29: sparse:     expected unsigned int [usertype] len
   drivers/net/ethernet/renesas/sh_eth.c:1367:29: sparse:     got restricted __le32 [usertype]
   drivers/net/ethernet/renesas/sh_eth.c:1376:24: sparse: sparse: invalid assignment: |=
   drivers/net/ethernet/renesas/sh_eth.c:1376:24: sparse:    left side has type unsigned int
   drivers/net/ethernet/renesas/sh_eth.c:1376:24: sparse:    right side has type restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1528:40: sparse: sparse: invalid assignment: &=
   drivers/net/ethernet/renesas/sh_eth.c:1528:40: sparse:    left side has type unsigned int
   drivers/net/ethernet/renesas/sh_eth.c:1528:40: sparse:    right side has type restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1585:35: sparse: sparse: restricted __le32 degrades to integer
   drivers/net/ethernet/renesas/sh_eth.c:1588:31: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1588:31: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1588:31: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1588:31: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1588:31: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1588:31: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1589:27: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1589:27: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1589:27: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1589:27: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1589:27: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1589:27: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1627:36: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1627:36: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1627:36: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1627:36: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1627:36: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1627:36: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1658:29: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] len @@     got restricted __le32 [usertype] @@
   drivers/net/ethernet/renesas/sh_eth.c:1658:29: sparse:     expected unsigned int [usertype] len
   drivers/net/ethernet/renesas/sh_eth.c:1658:29: sparse:     got restricted __le32 [usertype]
   drivers/net/ethernet/renesas/sh_eth.c:1674:38: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] addr @@     got restricted __le32 [usertype] @@
   drivers/net/ethernet/renesas/sh_eth.c:1674:38: sparse:     expected unsigned int [usertype] addr
   drivers/net/ethernet/renesas/sh_eth.c:1674:38: sparse:     got restricted __le32 [usertype]
   drivers/net/ethernet/renesas/sh_eth.c:1678:40: sparse: sparse: invalid assignment: |=
   drivers/net/ethernet/renesas/sh_eth.c:1678:40: sparse:    left side has type unsigned int
   drivers/net/ethernet/renesas/sh_eth.c:1678:40: sparse:    right side has type restricted __le32
   drivers/net/ethernet/renesas/sh_eth.c:1681:40: sparse: sparse: invalid assignment: |=
   drivers/net/ethernet/renesas/sh_eth.c:1681:40: sparse:    left side has type unsigned int
   drivers/net/ethernet/renesas/sh_eth.c:1681:40: sparse:    right side has type restricted __le32

vim +885 drivers/net/ethernet/renesas/sh_eth.c

65ac8851490ec9 drivers/net/sh_eth.c                  Yoshihiro Shimoda  2009-05-24  874  
e403d295817cf9 drivers/net/ethernet/renesas/sh_eth.c David S. Miller    2013-06-07  875  #define SH_GIGA_ETH_BASE	0xfee00000UL
8fcd496151b435 drivers/net/sh_eth.c                  Yoshihiro Shimoda  2011-03-07  876  #define GIGA_MALR(port)		(SH_GIGA_ETH_BASE + 0x800 * (port) + 0x05c8)
8fcd496151b435 drivers/net/sh_eth.c                  Yoshihiro Shimoda  2011-03-07  877  #define GIGA_MAHR(port)		(SH_GIGA_ETH_BASE + 0x800 * (port) + 0x05c0)
8fcd496151b435 drivers/net/sh_eth.c                  Yoshihiro Shimoda  2011-03-07  878  static void sh_eth_chip_reset_giga(struct net_device *ndev)
8fcd496151b435 drivers/net/sh_eth.c                  Yoshihiro Shimoda  2011-03-07  879  {
0799c2d6f42db2 drivers/net/ethernet/renesas/sh_eth.c Geert Uytterhoeven 2015-01-15  880  	u32 mahr[2], malr[2];
7927092253da59 drivers/net/ethernet/renesas/sh_eth.c Sergei Shtylyov    2016-05-08  881  	int i;
8fcd496151b435 drivers/net/sh_eth.c                  Yoshihiro Shimoda  2011-03-07  882  
8fcd496151b435 drivers/net/sh_eth.c                  Yoshihiro Shimoda  2011-03-07  883  	/* save MAHR and MALR */
8fcd496151b435 drivers/net/sh_eth.c                  Yoshihiro Shimoda  2011-03-07  884  	for (i = 0; i < 2; i++) {
ae70644df780c0 drivers/net/ethernet/renesas/sh_eth.c Yoshihiro Shimoda  2011-09-27 @885  		malr[i] = ioread32((void *)GIGA_MALR(i));
ae70644df780c0 drivers/net/ethernet/renesas/sh_eth.c Yoshihiro Shimoda  2011-09-27  886  		mahr[i] = ioread32((void *)GIGA_MAHR(i));
8fcd496151b435 drivers/net/sh_eth.c                  Yoshihiro Shimoda  2011-03-07  887  	}
8fcd496151b435 drivers/net/sh_eth.c                  Yoshihiro Shimoda  2011-03-07  888  
c66b2581123cd1 drivers/net/ethernet/renesas/sh_eth.c Sergei Shtylyov    2016-05-07  889  	sh_eth_chip_reset(ndev);
8fcd496151b435 drivers/net/sh_eth.c                  Yoshihiro Shimoda  2011-03-07  890  
8fcd496151b435 drivers/net/sh_eth.c                  Yoshihiro Shimoda  2011-03-07  891  	/* restore MAHR and MALR */
8fcd496151b435 drivers/net/sh_eth.c                  Yoshihiro Shimoda  2011-03-07  892  	for (i = 0; i < 2; i++) {
ae70644df780c0 drivers/net/ethernet/renesas/sh_eth.c Yoshihiro Shimoda  2011-09-27  893  		iowrite32(malr[i], (void *)GIGA_MALR(i));
ae70644df780c0 drivers/net/ethernet/renesas/sh_eth.c Yoshihiro Shimoda  2011-09-27  894  		iowrite32(mahr[i], (void *)GIGA_MAHR(i));
8fcd496151b435 drivers/net/sh_eth.c                  Yoshihiro Shimoda  2011-03-07  895  	}
8fcd496151b435 drivers/net/sh_eth.c                  Yoshihiro Shimoda  2011-03-07  896  }
8fcd496151b435 drivers/net/sh_eth.c                  Yoshihiro Shimoda  2011-03-07  897  

:::::: The code at line 885 was first introduced by commit
:::::: ae70644df780c0e87f1705fda932e7cb1bdb2074 net: sh_eth: use ioremap()

:::::: TO: Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>
:::::: CC: David S. Miller <davem@...emloft.net>

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

Download attachment ".config.gz" of type "application/gzip" (37185 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ