Re: [PATCH SPI for-next 2/3] spi: mchp-pci1xxxx: DMA Read support for copying data into SPI Buf

From: kernel test robot
Date: Sat Dec 16 2023 - 05:45:48 EST


Hi Thangaraj,

kernel test robot noticed the following build warnings:

[auto build test WARNING on broonie-spi/for-next]
[also build test WARNING on linus/master v6.7-rc5 next-20231215]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Thangaraj-Samynathan/spi-mchp-pci1xxxx-Add-support-for-DMA-in-SPI/20231215-195133
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
patch link: https://lore.kernel.org/r/20231215114748.152319-3-thangaraj.s%40microchip.com
patch subject: [PATCH SPI for-next 2/3] spi: mchp-pci1xxxx: DMA Read support for copying data into SPI Buf
config: arc-randconfig-r132-20231216 (https://download.01.org/0day-ci/archive/20231216/202312161832.s8L4PtmO-lkp@xxxxxxxxx/config)
compiler: arceb-elf-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231216/202312161832.s8L4PtmO-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312161832.s8L4PtmO-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> drivers/spi/spi-pci1xxxx.c:321:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *base @@ got void [noderef] __iomem * @@
drivers/spi/spi-pci1xxxx.c:321:22: sparse: expected void *base
drivers/spi/spi-pci1xxxx.c:321:22: sparse: got void [noderef] __iomem *
drivers/spi/spi-pci1xxxx.c:323:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *base @@ got void [noderef] __iomem * @@
drivers/spi/spi-pci1xxxx.c:323:22: sparse: expected void *base
drivers/spi/spi-pci1xxxx.c:323:22: sparse: got void [noderef] __iomem *
>> drivers/spi/spi-pci1xxxx.c:325:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/spi/spi-pci1xxxx.c:325:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/spi/spi-pci1xxxx.c:325:9: sparse: got void *
drivers/spi/spi-pci1xxxx.c:326:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/spi/spi-pci1xxxx.c:326:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/spi/spi-pci1xxxx.c:326:9: sparse: got void *
drivers/spi/spi-pci1xxxx.c:327:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/spi/spi-pci1xxxx.c:327:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/spi/spi-pci1xxxx.c:327:9: sparse: got void *
drivers/spi/spi-pci1xxxx.c:328:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/spi/spi-pci1xxxx.c:328:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/spi/spi-pci1xxxx.c:328:9: sparse: got void *
drivers/spi/spi-pci1xxxx.c:330:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/spi/spi-pci1xxxx.c:330:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/spi/spi-pci1xxxx.c:330:9: sparse: got void *
drivers/spi/spi-pci1xxxx.c:332:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/spi/spi-pci1xxxx.c:332:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/spi/spi-pci1xxxx.c:332:9: sparse: got void *
drivers/spi/spi-pci1xxxx.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/xarray.h, ...):
include/linux/page-flags.h:242:46: sparse: sparse: self-comparison always evaluates to false

vim +321 drivers/spi/spi-pci1xxxx.c

314
315 static void pci1xxxx_spi_setup_dma_read(struct pci1xxxx_spi_internal *p,
316 dma_addr_t dma_addr, u32 len)
317 {
318 void *base;
319
320 if (!p->hw_inst)
> 321 base = p->parent->dma_offset_bar + SPI_DMA_CH0_RD_BASE;
322 else
323 base = p->parent->dma_offset_bar + SPI_DMA_CH1_RD_BASE;
324
> 325 writel(DMA_INTR_EN, base + SPI_DMA_CH_CTL1_OFFSET);
326 writel(len, base + SPI_DMA_CH_XFER_LEN_OFFSET);
327 writel(lower_32_bits(dma_addr), base + SPI_DMA_CH_SAR_LO_OFFSET);
328 writel(upper_32_bits(dma_addr), base + SPI_DMA_CH_SAR_HI_OFFSET);
329 /* Updated SPI Command Registers */
330 writel(lower_32_bits(SPI_PERI_ADDR_BASE + SPI_MST_CMD_BUF_OFFSET(p->hw_inst)),
331 base + SPI_DMA_CH_DAR_LO_OFFSET);
332 writel(upper_32_bits(SPI_PERI_ADDR_BASE + SPI_MST_CMD_BUF_OFFSET(p->hw_inst)),
333 base + SPI_DMA_CH_DAR_HI_OFFSET);
334 }
335

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki