tree:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git pending-fixes
head: f7a4ee5329e2ea5cbbe17eaa8fff8d4e29b9bd7f
commit: d5baa0ec83de3739de003f3706c2ddd428f61001 [528/557] mtd: spinand: Propagate ECC
information to the MTD structure
config: arc-allyesconfig (attached as .config)
compiler: arc-elf-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
git checkout d5baa0ec83de3739de003f3706c2ddd428f61001
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
Note: the linux-next/pending-fixes HEAD f7a4ee5329e2ea5cbbe17eaa8fff8d4e29b9bd7f builds
fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>, old ones prefixed by <<):
drivers/mtd/nand/spi/core.c: In function 'spinand_init':
> drivers/mtd/nand/spi/core.c:1093:26: error: 'struct
nand_device' has no member named 'ecc'
1093 | mtd->ecc_strength =
nand->ecc.ctx.conf.strength;
| ^~
drivers/mtd/nand/spi/core.c:1094:27: error: 'struct nand_device' has no member
named 'ecc'
1094 | mtd->ecc_step_size = nand->ecc.ctx.conf.step_size;
| ^~
vim +1093 drivers/mtd/nand/spi/core.c
991
992 static int spinand_init(struct spinand_device *spinand)
993 {
994 struct device *dev = &spinand->spimem->spi->dev;
995 struct mtd_info *mtd = spinand_to_mtd(spinand);
996 struct nand_device *nand = mtd_to_nanddev(mtd);
997 int ret, i;
998
999 /*
1000 * We need a scratch buffer because the spi_mem interface requires that
1001 * buf passed in spi_mem_op->data.buf be DMA-able.
1002 */
1003 spinand->scratchbuf = kzalloc(SPINAND_MAX_ID_LEN, GFP_KERNEL);
1004 if (!spinand->scratchbuf)
1005 return -ENOMEM;
1006
1007 ret = spinand_detect(spinand);
1008 if (ret)
1009 goto err_free_bufs;
1010
1011 /*
1012 * Use kzalloc() instead of devm_kzalloc() here, because some drivers
1013 * may use this buffer for DMA access.
1014 * Memory allocated by devm_ does not guarantee DMA-safe alignment.
1015 */
1016 spinand->databuf = kzalloc(nanddev_page_size(nand) +
1017 nanddev_per_page_oobsize(nand),
1018 GFP_KERNEL);
1019 if (!spinand->databuf) {
1020 ret = -ENOMEM;
1021 goto err_free_bufs;
1022 }
1023
1024 spinand->oobbuf = spinand->databuf + nanddev_page_size(nand);
1025
1026 ret = spinand_init_cfg_cache(spinand);
1027 if (ret)
1028 goto err_free_bufs;
1029
1030 ret = spinand_init_quad_enable(spinand);
1031 if (ret)
1032 goto err_free_bufs;
1033
1034 ret = spinand_upd_cfg(spinand, CFG_OTP_ENABLE, 0);
1035 if (ret)
1036 goto err_free_bufs;
1037
1038 ret = spinand_manufacturer_init(spinand);
1039 if (ret) {
1040 dev_err(dev,
1041 "Failed to initialize the SPI NAND chip (err = %d)\n",
1042 ret);
1043 goto err_free_bufs;
1044 }
1045
1046 ret = spinand_create_dirmaps(spinand);
1047 if (ret) {
1048 dev_err(dev,
1049 "Failed to create direct mappings for read/write operations (err =
%d)\n",
1050 ret);
1051 goto err_manuf_cleanup;
1052 }
1053
1054 /* After power up, all blocks are locked, so unlock them here. */
1055 for (i = 0; i < nand->memorg.ntargets; i++) {
1056 ret = spinand_select_target(spinand, i);
1057 if (ret)
1058 goto err_manuf_cleanup;
1059
1060 ret = spinand_lock_block(spinand, BL_ALL_UNLOCKED);
1061 if (ret)
1062 goto err_manuf_cleanup;
1063 }
1064
1065 ret = nanddev_init(nand, &spinand_ops, THIS_MODULE);
1066 if (ret)
1067 goto err_manuf_cleanup;
1068
1069 /*
1070 * Right now, we don't support ECC, so let the whole oob
1071 * area is available for user.
1072 */
1073 mtd->_read_oob = spinand_mtd_read;
1074 mtd->_write_oob = spinand_mtd_write;
1075 mtd->_block_isbad = spinand_mtd_block_isbad;
1076 mtd->_block_markbad = spinand_mtd_block_markbad;
1077 mtd->_block_isreserved = spinand_mtd_block_isreserved;
1078 mtd->_erase = spinand_mtd_erase;
1079 mtd->_max_bad_blocks = nanddev_mtd_max_bad_blocks;
1080
1081 if (spinand->eccinfo.ooblayout)
1082 mtd_set_ooblayout(mtd, spinand->eccinfo.ooblayout);
1083 else
1084 mtd_set_ooblayout(mtd, &spinand_noecc_ooblayout);
1085
1086 ret = mtd_ooblayout_count_freebytes(mtd);
1087 if (ret < 0)
1088 goto err_cleanup_nanddev;
1089
1090 mtd->oobavail = ret;
1091
1092 /* Propagate ECC information to mtd_info */
1093 mtd->ecc_strength = nand->ecc.ctx.conf.strength;
1094 mtd->ecc_step_size = nand->ecc.ctx.conf.step_size;
1095
1096 return 0;
1097
1098 err_cleanup_nanddev:
1099 nanddev_cleanup(nand);
1100
1101 err_manuf_cleanup:
1102 spinand_manufacturer_cleanup(spinand);
1103
1104 err_free_bufs:
1105 kfree(spinand->databuf);
1106 kfree(spinand->scratchbuf);
1107 return ret;
1108 }
1109
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org