Re: [PATCH v2] mtd: rawnand: remove ->legacy.erase and single_erase()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Masahiro,

I love your patch! Yet something to improve:

[auto build test ERROR on v5.0-rc2]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Masahiro-Yamada/mtd-rawnand-remove-legacy-erase-and-single_erase/20190122-040438
config: sh-allyesconfig (attached as .config)
compiler: sh4-linux-gnu-gcc (Debian 8.2.0-11) 8.2.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
        GCC_VERSION=8.2.0 make.cross ARCH=sh 

All errors (new ones prefixed by >>):

   drivers/mtd/nand/raw/denali.c: In function 'denali_attach_chip':
>> drivers/mtd/nand/raw/denali.c:1247:14: error: 'struct nand_legacy' has no member named 'erase'
     chip->legacy.erase = denali_erase;
                 ^

vim +1247 drivers/mtd/nand/raw/denali.c

6da27b469 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-03-23  1168  
d03af162b drivers/mtd/nand/raw/denali.c Miquel Raynal   2018-07-20  1169  static int denali_attach_chip(struct nand_chip *chip)
ce082596a drivers/mtd/nand/denali.c     Jason Roberts   2010-05-13  1170  {
1394a7265 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-03-23  1171  	struct mtd_info *mtd = nand_to_mtd(chip);
d03af162b drivers/mtd/nand/raw/denali.c Miquel Raynal   2018-07-20  1172  	struct denali_nand_info *denali = mtd_to_denali(mtd);
2a0a288ec drivers/mtd/nand/denali.c     Dinh Nguyen     2012-09-27  1173  	int ret;
ce082596a drivers/mtd/nand/denali.c     Jason Roberts   2010-05-13  1174  
0d3a966d2 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-16  1175  	if (ioread32(denali->reg + FEATURES) & FEATURES__DMA)
26d266e10 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-13  1176  		denali->dma_avail = 1;
26d266e10 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-13  1177  
26d266e10 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-13  1178  	if (denali->dma_avail) {
26d266e10 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-13  1179  		int dma_bit = denali->caps & DENALI_CAP_DMA_64BIT ? 64 : 32;
26d266e10 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-13  1180  
26d266e10 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-13  1181  		ret = dma_set_mask(denali->dev, DMA_BIT_MASK(dma_bit));
e07caa368 drivers/mtd/nand/denali.c     Huang Shijie    2013-12-21  1182  		if (ret) {
26d266e10 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-13  1183  			dev_info(denali->dev,
26d266e10 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-13  1184  				 "Failed to set DMA mask. Disabling DMA.\n");
26d266e10 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-13  1185  			denali->dma_avail = 0;
26d266e10 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-13  1186  		}
e07caa368 drivers/mtd/nand/denali.c     Huang Shijie    2013-12-21  1187  	}
e07caa368 drivers/mtd/nand/denali.c     Huang Shijie    2013-12-21  1188  
26d266e10 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-13  1189  	if (denali->dma_avail) {
997cde2a2 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-13  1190  		chip->options |= NAND_USE_BOUNCE_BUFFER;
997cde2a2 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-13  1191  		chip->buf_align = 16;
89dcb27b0 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-09-22  1192  		if (denali->caps & DENALI_CAP_DMA_64BIT)
89dcb27b0 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-09-22  1193  			denali->setup_dma = denali_setup_dma64;
89dcb27b0 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-09-22  1194  		else
89dcb27b0 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-09-22  1195  			denali->setup_dma = denali_setup_dma32;
66406524e drivers/mtd/nand/denali.c     Chuanxiao.Dong  2010-08-06  1196  	}
66406524e drivers/mtd/nand/denali.c     Chuanxiao.Dong  2010-08-06  1197  
1394a7265 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-03-23  1198  	chip->bbt_options |= NAND_BBT_USE_FLASH;
777f2d49e drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-13  1199  	chip->bbt_options |= NAND_BBT_NO_OOB;
1394a7265 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-03-23  1200  	chip->ecc.mode = NAND_ECC_HW_SYNDROME;
1394a7265 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-03-23  1201  	chip->options |= NAND_NO_SUBPAGE_WRITE;
d99d72829 drivers/mtd/nand/denali.c     Graham Moore    2015-01-14  1202  
f9801fda9 drivers/mtd/nand/raw/denali.c Abhishek Sahu   2018-06-20  1203  	ret = nand_ecc_choose_conf(chip, denali->ecc_caps,
f9801fda9 drivers/mtd/nand/raw/denali.c Abhishek Sahu   2018-06-20  1204  				   mtd->oobsize - denali->oob_skip_bytes);
7de117fd5 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-07  1205  	if (ret) {
7de117fd5 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-07  1206  		dev_err(denali->dev, "Failed to setup ECC settings.\n");
d03af162b drivers/mtd/nand/raw/denali.c Miquel Raynal   2018-07-20  1207  		return ret;
ce082596a drivers/mtd/nand/denali.c     Jason Roberts   2010-05-13  1208  	}
ce082596a drivers/mtd/nand/denali.c     Jason Roberts   2010-05-13  1209  
7de117fd5 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-07  1210  	dev_dbg(denali->dev,
7de117fd5 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-07  1211  		"chosen ECC settings: step=%d, strength=%d, bytes=%d\n",
7de117fd5 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-07  1212  		chip->ecc.size, chip->ecc.strength, chip->ecc.bytes);
7de117fd5 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-07  1213  
e0d53b3f8 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-09-22  1214  	iowrite32(FIELD_PREP(ECC_CORRECTION__ERASE_THRESHOLD, 1) |
e0d53b3f8 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-09-22  1215  		  FIELD_PREP(ECC_CORRECTION__VALUE, chip->ecc.strength),
0d3a966d2 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-16  1216  		  denali->reg + ECC_CORRECTION);
0615e7ad5 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-07  1217  	iowrite32(mtd->erasesize / mtd->writesize,
0d3a966d2 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-16  1218  		  denali->reg + PAGES_PER_BLOCK);
0615e7ad5 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-07  1219  	iowrite32(chip->options & NAND_BUSWIDTH_16 ? 1 : 0,
0d3a966d2 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-16  1220  		  denali->reg + DEVICE_WIDTH);
a3750a642 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-09-13  1221  	iowrite32(chip->options & NAND_ROW_ADDR_3 ? 0 : TWO_ROW_ADDR_CYCLES__FLAG,
a3750a642 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-09-13  1222  		  denali->reg + TWO_ROW_ADDR_CYCLES);
0d3a966d2 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-16  1223  	iowrite32(mtd->writesize, denali->reg + DEVICE_MAIN_AREA_SIZE);
0d3a966d2 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-16  1224  	iowrite32(mtd->oobsize, denali->reg + DEVICE_SPARE_AREA_SIZE);
7de117fd5 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-07  1225  
0d3a966d2 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-16  1226  	iowrite32(chip->ecc.size, denali->reg + CFG_DATA_BLOCK_SIZE);
0d3a966d2 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-16  1227  	iowrite32(chip->ecc.size, denali->reg + CFG_LAST_DATA_BLOCK_SIZE);
7de117fd5 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-07  1228  	/* chip->ecc.steps is set by nand_scan_tail(); not available here */
7de117fd5 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-07  1229  	iowrite32(mtd->writesize / chip->ecc.size,
0d3a966d2 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-16  1230  		  denali->reg + CFG_NUM_DATA_BLOCKS);
7de117fd5 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-07  1231  
14fad62b6 drivers/mtd/nand/denali.c     Boris Brezillon 2016-02-03  1232  	mtd_set_ooblayout(mtd, &denali_ooblayout_ops);
db9a32104 drivers/mtd/nand/denali.c     Chuanxiao Dong  2010-08-06  1233  
fa6134e54 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-13  1234  	if (chip->options & NAND_BUSWIDTH_16) {
716bbbabc drivers/mtd/nand/raw/denali.c Boris Brezillon 2018-09-07  1235  		chip->legacy.read_buf = denali_read_buf16;
716bbbabc drivers/mtd/nand/raw/denali.c Boris Brezillon 2018-09-07  1236  		chip->legacy.write_buf = denali_write_buf16;
fa6134e54 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-13  1237  	} else {
716bbbabc drivers/mtd/nand/raw/denali.c Boris Brezillon 2018-09-07  1238  		chip->legacy.read_buf = denali_read_buf;
716bbbabc drivers/mtd/nand/raw/denali.c Boris Brezillon 2018-09-07  1239  		chip->legacy.write_buf = denali_write_buf;
fa6134e54 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-13  1240  	}
1394a7265 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-03-23  1241  	chip->ecc.read_page = denali_read_page;
1394a7265 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-03-23  1242  	chip->ecc.read_page_raw = denali_read_page_raw;
1394a7265 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-03-23  1243  	chip->ecc.write_page = denali_write_page;
1394a7265 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-03-23  1244  	chip->ecc.write_page_raw = denali_write_page_raw;
1394a7265 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-03-23  1245  	chip->ecc.read_oob = denali_read_oob;
1394a7265 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-03-23  1246  	chip->ecc.write_oob = denali_write_oob;
f9ebd1bb4 drivers/mtd/nand/raw/denali.c Boris Brezillon 2018-09-07 @1247  	chip->legacy.erase = denali_erase;
ce082596a drivers/mtd/nand/denali.c     Jason Roberts   2010-05-13  1248  
e93c1640e drivers/mtd/nand/denali.c     Masahiro Yamada 2017-03-23  1249  	ret = denali_multidev_fixup(denali);
e93c1640e drivers/mtd/nand/denali.c     Masahiro Yamada 2017-03-23  1250  	if (ret)
d03af162b drivers/mtd/nand/raw/denali.c Miquel Raynal   2018-07-20  1251  		return ret;
6da27b469 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-03-23  1252  
7d370b2c2 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-13  1253  	/*
7d370b2c2 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-13  1254  	 * This buffer is DMA-mapped by denali_{read,write}_page_raw.  Do not
7d370b2c2 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-13  1255  	 * use devm_kmalloc() because the memory allocated by devm_ does not
7d370b2c2 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-13  1256  	 * guarantee DMA-safe alignment.
7d370b2c2 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-13  1257  	 */
7d370b2c2 drivers/mtd/nand/denali.c     Masahiro Yamada 2017-06-13  1258  	denali->buf = kmalloc(mtd->writesize + mtd->oobsize, GFP_KERNEL);
d03af162b drivers/mtd/nand/raw/denali.c Miquel Raynal   2018-07-20  1259  	if (!denali->buf)
d03af162b drivers/mtd/nand/raw/denali.c Miquel Raynal   2018-07-20  1260  		return -ENOMEM;
d03af162b drivers/mtd/nand/raw/denali.c Miquel Raynal   2018-07-20  1261  
d03af162b drivers/mtd/nand/raw/denali.c Miquel Raynal   2018-07-20  1262  	return 0;
d03af162b drivers/mtd/nand/raw/denali.c Miquel Raynal   2018-07-20  1263  }
d03af162b drivers/mtd/nand/raw/denali.c Miquel Raynal   2018-07-20  1264  

:::::: The code at line 1247 was first introduced by commit
:::::: f9ebd1bb41031afc162e9acda7ad044a35bccf82 mtd: rawnand: Deprecate ->erase()

:::::: TO: Boris Brezillon <boris.brezillon@xxxxxxxxxxx>
:::::: CC: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux