drivers/i2c/busses/i2c-iop3xx.c:405:29: sparse: expected void
From: kernel test robot
Date: Tue Aug 25 2020 - 13:15:13 EST
Hi Krzysztof,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6a9dc5fd6170d0a41c8a14eb19e63d94bea5705a
commit: 4a2d5f663dab6614772d8e28ca190b127ba46d9d i2c: Enable compile testing for more drivers
date: 7 months ago
config: openrisc-randconfig-s032-20200825 (attached as .config)
compiler: or1k-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.2-191-g10164920-dirty
git checkout 4a2d5f663dab6614772d8e28ca190b127ba46d9d
# 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=openrisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
sparse warnings: (new ones prefixed by >>)
drivers/i2c/busses/i2c-iop3xx.c:405:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *addr @@ got void [noderef] <asn:2> *ioaddr @@
>> drivers/i2c/busses/i2c-iop3xx.c:405:29: sparse: expected void *addr
drivers/i2c/busses/i2c-iop3xx.c:405:29: sparse: got void [noderef] <asn:2> *ioaddr
drivers/i2c/busses/i2c-iop3xx.c:504:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *addr @@ got void [noderef] <asn:2> *ioaddr @@
drivers/i2c/busses/i2c-iop3xx.c:504:29: sparse: expected void *addr
drivers/i2c/busses/i2c-iop3xx.c:504:29: sparse: got void [noderef] <asn:2> *ioaddr
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4a2d5f663dab6614772d8e28ca190b127ba46d9d
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 4a2d5f663dab6614772d8e28ca190b127ba46d9d
vim +405 drivers/i2c/busses/i2c-iop3xx.c
^1da177e4c3f415 Linus Torvalds 2005-04-16 388
^1da177e4c3f415 Linus Torvalds 2005-04-16 389 static int
3ae5eaec1d2d9c0 Russell King 2005-11-09 390 iop3xx_i2c_remove(struct platform_device *pdev)
^1da177e4c3f415 Linus Torvalds 2005-04-16 391 {
3ae5eaec1d2d9c0 Russell King 2005-11-09 392 struct i2c_adapter *padapter = platform_get_drvdata(pdev);
^1da177e4c3f415 Linus Torvalds 2005-04-16 393 struct i2c_algo_iop3xx_data *adapter_data =
^1da177e4c3f415 Linus Torvalds 2005-04-16 394 (struct i2c_algo_iop3xx_data *)padapter->algo_data;
^1da177e4c3f415 Linus Torvalds 2005-04-16 395 struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
^1da177e4c3f415 Linus Torvalds 2005-04-16 396 unsigned long cr = __raw_readl(adapter_data->ioaddr + CR_OFFSET);
^1da177e4c3f415 Linus Torvalds 2005-04-16 397
^1da177e4c3f415 Linus Torvalds 2005-04-16 398 /*
^1da177e4c3f415 Linus Torvalds 2005-04-16 399 * Disable the actual HW unit
^1da177e4c3f415 Linus Torvalds 2005-04-16 400 */
^1da177e4c3f415 Linus Torvalds 2005-04-16 401 cr &= ~(IOP3XX_ICR_ALD_IE | IOP3XX_ICR_BERR_IE |
^1da177e4c3f415 Linus Torvalds 2005-04-16 402 IOP3XX_ICR_RXFULL_IE | IOP3XX_ICR_TXEMPTY_IE);
^1da177e4c3f415 Linus Torvalds 2005-04-16 403 __raw_writel(cr, adapter_data->ioaddr + CR_OFFSET);
^1da177e4c3f415 Linus Torvalds 2005-04-16 404
747fcc91cb5bade Aaro Koskinen 2010-11-29 @405 iounmap(adapter_data->ioaddr);
^1da177e4c3f415 Linus Torvalds 2005-04-16 406 release_mem_region(res->start, IOP3XX_I2C_IO_SIZE);
^1da177e4c3f415 Linus Torvalds 2005-04-16 407 kfree(adapter_data);
^1da177e4c3f415 Linus Torvalds 2005-04-16 408 kfree(padapter);
^1da177e4c3f415 Linus Torvalds 2005-04-16 409
^1da177e4c3f415 Linus Torvalds 2005-04-16 410 return 0;
^1da177e4c3f415 Linus Torvalds 2005-04-16 411 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 412
:::::: The code at line 405 was first introduced by commit
:::::: 747fcc91cb5bade1f681b3a8d0e6d4f697d865fd i2c-iop3xx: add iomem annotation
:::::: TO: Aaro Koskinen <aaro.koskinen@xxxxxx>
:::::: CC: Ben Dooks <ben-linux@xxxxxxxxx>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip