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: <202106090036.SpsUxoHy-lkp@intel.com>
Date:   Wed, 9 Jun 2021 00:26:45 +0800
From:   kernel test robot <lkp@...el.com>
To:     Christophe Leroy <christophe.leroy@...roup.eu>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Michael Ellerman <mpe@...erman.id.au>
Subject: arch/powerpc/platforms/44x/ppc476.c:241:34: 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:   614124bea77e452aa6df7a8714e8bc820b489922
commit: 894fa235eb4ca0bfa692dbe4932c2f940cdc8c1e powerpc: inline iomap accessors
date:   6 months ago
config: powerpc-randconfig-s032-20210608 (attached as .config)
compiler: powerpc-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-341-g8af24329-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=894fa235eb4ca0bfa692dbe4932c2f940cdc8c1e
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 894fa235eb4ca0bfa692dbe4932c2f940cdc8c1e
        # 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__' W=1 ARCH=powerpc 

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 >>)
   arch/powerpc/platforms/44x/ppc476.c:236:17: sparse: sparse: cast removes address space '__iomem' of expression
>> arch/powerpc/platforms/44x/ppc476.c:241:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got unsigned char [usertype] * @@
   arch/powerpc/platforms/44x/ppc476.c:241:34: sparse:     expected void const volatile [noderef] __iomem *addr
   arch/powerpc/platforms/44x/ppc476.c:241:34: sparse:     got unsigned char [usertype] *
   arch/powerpc/platforms/44x/ppc476.c:243:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got unsigned char [usertype] *[assigned] fpga @@
   arch/powerpc/platforms/44x/ppc476.c:243:17: sparse:     expected void volatile [noderef] __iomem *addr
   arch/powerpc/platforms/44x/ppc476.c:243:17: sparse:     got unsigned char [usertype] *[assigned] fpga

vim +241 arch/powerpc/platforms/44x/ppc476.c

228d55053397e6 arch/powerpc/platforms/44x/currituck.c Tony Breeds     2011-11-30  217  
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09  218  static int board_rev = -1;
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09  219  static int __init ppc47x_get_board_rev(void)
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09  220  {
2a2c74b2efcb1a arch/powerpc/platforms/44x/ppc476.c    Alistair Popple 2014-03-06  221  	int reg;
2a2c74b2efcb1a arch/powerpc/platforms/44x/ppc476.c    Alistair Popple 2014-03-06  222  	u8 *fpga;
2a2c74b2efcb1a arch/powerpc/platforms/44x/ppc476.c    Alistair Popple 2014-03-06  223  	struct device_node *np = NULL;
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09  224  
2a2c74b2efcb1a arch/powerpc/platforms/44x/ppc476.c    Alistair Popple 2014-03-06  225  	if (of_machine_is_compatible("ibm,currituck")) {
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09  226  		np = of_find_compatible_node(NULL, NULL, "ibm,currituck-fpga");
2a2c74b2efcb1a arch/powerpc/platforms/44x/ppc476.c    Alistair Popple 2014-03-06  227  		reg = 0;
2a2c74b2efcb1a arch/powerpc/platforms/44x/ppc476.c    Alistair Popple 2014-03-06  228  	} else if (of_machine_is_compatible("ibm,akebono")) {
2a2c74b2efcb1a arch/powerpc/platforms/44x/ppc476.c    Alistair Popple 2014-03-06  229  		np = of_find_compatible_node(NULL, NULL, "ibm,akebono-fpga");
2a2c74b2efcb1a arch/powerpc/platforms/44x/ppc476.c    Alistair Popple 2014-03-06  230  		reg = 2;
2a2c74b2efcb1a arch/powerpc/platforms/44x/ppc476.c    Alistair Popple 2014-03-06  231  	}
2a2c74b2efcb1a arch/powerpc/platforms/44x/ppc476.c    Alistair Popple 2014-03-06  232  
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09  233  	if (!np)
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09  234  		goto fail;
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09  235  
2a2c74b2efcb1a arch/powerpc/platforms/44x/ppc476.c    Alistair Popple 2014-03-06  236  	fpga = (u8 *) of_iomap(np, 0);
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09  237  	of_node_put(np);
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09  238  	if (!fpga)
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09  239  		goto fail;
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09  240  
2a2c74b2efcb1a arch/powerpc/platforms/44x/ppc476.c    Alistair Popple 2014-03-06 @241  	board_rev = ioread8(fpga + reg) & 0x03;
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09  242  	pr_info("%s: Found board revision %d\n", __func__, board_rev);
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09  243  	iounmap(fpga);
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09  244  	return 0;
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09  245  
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09  246  fail:
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09  247  	pr_info("%s: Unable to find board revision\n", __func__);
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09  248  	return 0;
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09  249  }
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09  250  machine_arch_initcall(ppc47x, ppc47x_get_board_rev);
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09  251  

:::::: The code at line 241 was first introduced by commit
:::::: 2a2c74b2efcb1a0ca3fdcb5fbb96ad8de6a29177 IBM Akebono: Add the Akebono platform

:::::: TO: Alistair Popple <alistair@...ple.id.au>
:::::: CC: Benjamin Herrenschmidt <benh@...nel.crashing.org>

---
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" (33879 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ