[broonie-misc:spi-5.15 28/30] drivers/spi/spi-rockchip-sfc.c:456:17: sparse: sparse: incorrect type in argument 1 (different address spaces)

From: kernel test robot
Date: Sat Aug 21 2021 - 07:05:33 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git spi-5.15
head: 7a4697b201a617907e4b440ae34df601d4755bef
commit: 0b89fc0a367edab09065af722894d186bd0ccb0d [28/30] spi: rockchip-sfc: add rockchip serial flash controller
config: arm-randconfig-s032-20210821 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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-348-gf0e6938b-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git/commit/?id=0b89fc0a367edab09065af722894d186bd0ccb0d
git remote add broonie-misc https://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git
git fetch --no-tags broonie-misc spi-5.15
git checkout 0b89fc0a367edab09065af722894d186bd0ccb0d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm

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/spi/spi-rockchip-sfc.c:456:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *to @@ got void *buffer @@
drivers/spi/spi-rockchip-sfc.c:456:17: sparse: expected void volatile [noderef] __iomem *to
drivers/spi/spi-rockchip-sfc.c:456:17: sparse: got void *buffer
>> drivers/spi/spi-rockchip-sfc.c:465:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] __iomem *from @@ got void *buffer @@
drivers/spi/spi-rockchip-sfc.c:465:17: sparse: expected void const volatile [noderef] __iomem *from
drivers/spi/spi-rockchip-sfc.c:465:17: sparse: got void *buffer

vim +456 drivers/spi/spi-rockchip-sfc.c

447
448 static int rockchip_sfc_xfer_data_dma(struct rockchip_sfc *sfc,
449 const struct spi_mem_op *op, u32 len)
450 {
451 int ret;
452
453 dev_dbg(sfc->dev, "sfc xfer_dma len=%x\n", len);
454
455 if (op->data.dir == SPI_MEM_DATA_OUT)
> 456 memcpy_toio(sfc->buffer, op->data.buf.out, len);
457
458 ret = rockchip_sfc_fifo_transfer_dma(sfc, sfc->dma_buffer, len);
459 if (!wait_for_completion_timeout(&sfc->cp, msecs_to_jiffies(2000))) {
460 dev_err(sfc->dev, "DMA wait for transfer finish timeout\n");
461 ret = -ETIMEDOUT;
462 }
463 rockchip_sfc_irq_mask(sfc, SFC_IMR_DMA);
464 if (op->data.dir == SPI_MEM_DATA_IN)
> 465 memcpy_fromio(op->data.buf.in, sfc->buffer, len);
466
467 return ret;
468 }
469

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

Attachment: .config.gz
Description: application/gzip