tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 444fc5cde64330661bf59944c43844e7d4c2ccd8 commit: d166a73503ef74fb761f1a3103ef7919928d7b52 spi: fspi: dynamically alloc AHB memory date: 3 months ago config: openrisc-randconfig-s031-20200527 (attached as .config) compiler: or1k-linux-gcc (GCC) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.1-240-gf0fe1cd9-dirty git checkout d166a73503ef74fb761f1a3103ef7919928d7b52 # save the attached .config to linux build tree make W=1 C=1 ARCH=openrisc CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot sparse warnings: (new ones prefixed by >>) drivers/spi/spi-nxp-fspi.c:472:25: sparse: sparse: cast from restricted __be32 >> drivers/spi/spi-nxp-fspi.c:672:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *addr @@ got void [noderef] *ahb_addr @@ drivers/spi/spi-nxp-fspi.c:672:34: sparse: expected void *addr drivers/spi/spi-nxp-fspi.c:672:34: sparse: got void [noderef] *ahb_addr drivers/spi/spi-nxp-fspi.c:1102:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *addr @@ got void [noderef] *ahb_addr @@ drivers/spi/spi-nxp-fspi.c:1102:26: sparse: expected void *addr drivers/spi/spi-nxp-fspi.c:1102:26: sparse: got void [noderef] *ahb_addr include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32 vim +672 drivers/spi/spi-nxp-fspi.c 662 663 static int nxp_fspi_read_ahb(struct nxp_fspi *f, const struct spi_mem_op *op) 664 { 665 u32 start = op->addr.val; 666 u32 len = op->data.nbytes; 667 668 /* if necessary, ioremap before AHB read */ 669 if ((!f->ahb_addr) || start < f->memmap_start || 670 start + len > f->memmap_start + f->memmap_len) { 671 if (f->ahb_addr) > 672 iounmap(f->ahb_addr); 673 674 f->memmap_start = start; 675 f->memmap_len = len > NXP_FSPI_MIN_IOMAP ? 676 len : NXP_FSPI_MIN_IOMAP; 677 678 f->ahb_addr = ioremap_wc(f->memmap_phy + f->memmap_start, 679 f->memmap_len); 680 681 if (!f->ahb_addr) { 682 dev_err(f->dev, "failed to alloc memory\n"); 683 return -ENOMEM; 684 } 685 } 686 687 /* Read out the data directly from the AHB buffer. */ 688 memcpy_fromio(op->data.buf.in, 689 f->ahb_addr + start - f->memmap_start, len); 690 691 return 0; 692 } 693 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org