Re: [PATCH 10/12] mtd: rawnand: brcmnand: Add BCMBCA read data bus interface

kernel test robot
2023-06-11T09:55:53Z

Hi William,

kernel test robot noticed the following build warnings:

[auto build test WARNING on mtd/nand/next]
[also build test WARNING on mtd/mtd/next mtd/mtd/fixes linus/master v6.4-rc5 next-20230609]
[cannot apply to robh/for-next]
[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/William-Zhang/mtd-rawnand-brcmnand-Fix-ECC-level-field-setting-for-v7-2-controller/20230607-071834
base: https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next
patch link: https://lore.kernel.org/r/20230606231252.94838-11-william.zhang%40broadcom.com
patch subject: [PATCH 10/12] mtd: rawnand: brcmnand: Add BCMBCA read data bus interface
config: arm-randconfig-s052-20230611 (https://download.01.org/0day-ci/archive/20230611/202306111741.1Hs0TVE4-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.3.0
reproduce:
mkdir -p ~/bin
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.4-39-gce1a6720-dirty
# https://github.com/intel-lab-lkp/linux/commit/2fce7300f3e21ad0cb55442e1acfeaf60f41bf7d
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review William-Zhang/mtd-rawnand-brcmnand-Fix-ECC-level-field-setting-for-v7-2-controller/20230607-071834
git checkout 2fce7300f3e21ad0cb55442e1acfeaf60f41bf7d
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash drivers/mtd/nand/raw/brcmnand/

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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306111741.1Hs0TVE4-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c:83:48: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *flash_cache @@ got void [noderef] __iomem *flash_cache @@
drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c:83:48: sparse: expected void *flash_cache
drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c:83:48: sparse: got void [noderef] __iomem *flash_cache
drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c:84:25: sparse: sparse: cast removes address space '__iomem' of expression
drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c:84:25: sparse: sparse: cast removes address space '__iomem' of expression
drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c:84:25: sparse: sparse: cast removes address space '__iomem' of expression
drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c:86:25: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c:86:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] __iomem *from @@ got void * @@
drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c:86:25: sparse: expected void const volatile [noderef] __iomem *from
drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c:86:25: sparse: got void *

vim +86 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,
73 int fc_words, bool is_param)
74 {
75 int i;
76
77 if (!is_param) {
78 /*
79 * memcpy can do unaligned aligned access depending on source
80 * and dest address, which is incompatible with nand cache. Fallback
81 * to the memcpy for io version
82 */
> 83 if (bcmbca_nand_is_buf_aligned(flash_cache, buffer))
84 memcpy((void *)buffer, (void *)flash_cache, fc_words * 4);
85 else
> 86 memcpy_fromio((void *)buffer, (void *)flash_cache, fc_words * 4);
87 } else {
88 /* Flash cache has same endian as the host for parameter pages */
89 for (i = 0; i < fc_words; i++, buffer++)
90 *buffer = __raw_readl(flash_cache + i * 4);
91 }
92 }
93

--
0-DAY CI Kernel Test Service