Skip to contentSkip to conversation

drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c:79:41: sparse: sparse: cast removes address space '__iomem' of expression

PATCH kernel test robot 1 participant 1 message Feb 27, 2024

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next
head:   65a7f244b15684856241d04b8f3287d9124bd1ff
commit: c52c16d1bee5c3b074989e839eeceed2a0a8cc43 [22/25] mtd: rawnand: brcmnand: Add BCMBCA read data bus interface
config: riscv-randconfig-r131-20240227 (https://download.01.org/0day-ci/archive/20240227/[email protected]/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project edd4aee4dd9b5b98b2576a6f783e4086173d902a)
reproduce: (https://download.01.org/0day-ci/archive/20240227/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

sparse warnings: (new ones prefixed by >>)

>> drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c:79:41: sparse: sparse: cast removes address space '__iomem' of expression

drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c:80:17: sparse: sparse: cast removes address space '__iomem' of expression drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c:80:17: sparse: sparse: cast removes address space '__iomem' of expression drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c:80:17: sparse: sparse: cast removes address space '__iomem' of expression

vim +/__iomem +79 drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c

    70	
    71	static void bcmbca_read_data_bus(struct brcmnand_soc *soc,
    72					 void __iomem *flash_cache,  u32 *buffer, int fc_words)
    73	{
    74		/*
    75		 * memcpy can do unaligned aligned access depending on source
    76		 * and dest address, which is incompatible with nand cache. Fallback
    77		 * to the memcpy_fromio in such case
    78		 */
  > 79		if (bcmbca_nand_is_buf_aligned((void *)flash_cache, buffer))
    80			memcpy((void *)buffer, (void *)flash_cache, fc_words * 4);
    81		else
    82			memcpy_fromio((void *)buffer, flash_cache, fc_words * 4);
    83	}
    84	
Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki