Re: [PATCH v4 4/5] mtd: rawnand: Introduce a new function nand_check_is_erased_page()
From: kbuild test robot
Date: Mon May 18 2020 - 11:17:43 EST
Hi Bean,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.7-rc6 next-20200518]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Bean-Huo/Micron-SLC-NAND-filling-block/20200518-220231
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git b9bbe6ed63b2b9f2c9ee5cbd0f2c946a2723f4ce
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>, old ones prefixed by <<):
drivers/mtd/nand/raw/nand_base.c: In function 'nand_check_is_erased_page':
>> drivers/mtd/nand/raw/nand_base.c:2611:2: error: 'max_bitflips' undeclared (first use in this function)
2611 | max_bitflips = 0;
| ^~~~~~~~~~~~
drivers/mtd/nand/raw/nand_base.c:2611:2: note: each undeclared identifier is reported only once for each function it appears in
vim +/max_bitflips +2611 drivers/mtd/nand/raw/nand_base.c
2586
2587 /**
2588 * nand_check_is_erased_page - check if this page is a empty page
2589 * @chip: nand chip info structure
2590 * @page_data: data buffer containing the data in the page being checked
2591 * @oob: indicate if chip->oob_poi points to oob date of the page
2592 *
2593 * Returns true if this is an un-programmed page, false otherwise.
2594 */
2595 int nand_check_is_erased_page(struct nand_chip *chip, u8 *page_data, bool oob)
2596 {
2597 struct mtd_info *mtd = nand_to_mtd(chip);
2598 int ret, i;
2599 u8 *databuf, *eccbuf = NULL;
2600 struct mtd_oob_region oobregion;
2601 int datasize, eccbytes = 0;
2602
2603 databuf = page_data;
2604 datasize = chip->ecc.size;
2605
2606 if (oob) {
2607 mtd_ooblayout_ecc(mtd, 0, &oobregion);
2608 eccbuf = chip->oob_poi + oobregion.offset;
2609 eccbytes = chip->ecc.bytes;
2610 }
> 2611 max_bitflips = 0;
2612
2613 for (i = 0; i < chip->ecc.steps; i++) {
2614 ret = nand_check_erased_ecc_chunk(databuf, datasize,
2615 eccbuf, eccbytes,
2616 NULL, 0, chip->ecc.strength);
2617 if (ret < 0)
2618 return false;
2619
2620 databuf += chip->ecc.size;
2621 eccbuf += chip->ecc.bytes;
2622 }
2623
2624 return ret;
2625 }
2626 EXPORT_SYMBOL(nand_check_is_erased_page);
2627
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip