linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Michael Ellerman <mpe@ellerman.id.au>
Subject: arch/powerpc/platforms/44x/ppc476.c:241:34: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Tue, 6 Jul 2021 22:15:50 +0800	[thread overview]
Message-ID: <202107062242.bCGXiwNW-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 6445 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   79160a603bdb51916226caf4a6616cc4e1c58a58
commit: 894fa235eb4ca0bfa692dbe4932c2f940cdc8c1e powerpc: inline iomap accessors
date:   7 months ago
config: powerpc64-randconfig-s032-20210706 (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__' ARCH=powerpc64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.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@popple.id.au>
:::::: CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31307 bytes --]

             reply	other threads:[~2021-07-06 14:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-06 14:15 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-09-14 23:21 arch/powerpc/platforms/44x/ppc476.c:241:34: sparse: sparse: incorrect type in argument 1 (different address spaces) kernel test robot
2021-06-08 16:26 kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202107062242.bCGXiwNW-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpe@ellerman.id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).