Re: [PATCH 2/2] mtd: mtdconcat: Remove concat_{read|write}_oob

From: Miquel Raynal
Date: Sat Aug 07 2021 - 06:28:22 EST


Hi Zhihao,

Zhihao Cheng <chengzhihao1@xxxxxxxxxx> wrote on Sat, 7 Aug 2021
10:59:32 +0800:

> 在 2021/8/7 3:26, Miquel Raynal 写道:
> Hi Miquel,
> >> static int concat_erase(struct mtd_info *mtd, struct erase_info *instr)
> >> {
> >> struct mtd_concat *concat = CONCAT(mtd);
> >> @@ -684,10 +580,6 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to c
> >> subdev_master = mtd_get_master(subdev[0]);
> >> if (subdev_master->_writev)
> >> concat->mtd._writev = concat_writev;
> >> - if (subdev_master->_read_oob)
> >> - concat->mtd._read_oob = concat_read_oob;
> >> - if (subdev_master->_write_oob)
> >> - concat->mtd._write_oob = concat_write_oob;
> > Actually I am not sure _read|write_oob() is the right callback to
> > remove.
> >
> > Richard, what is your input on this? Shall we remove _read|write()
> > instead? I don't remember the exact rationale behind these two helpers.
>
> Oh, I guess I made a mistake. It looks like that reserving _{read|write}_oob is a better method in my limited knowledge to nand driver. For example, nand_do_read_oob() behaves different from nand_do_read_ops(), and calling which function is decided by mtd_oob_ops.databuf.
> Callback _read_oobs() can support both functions, but callback _read() don't support nand_do_read_oob(). So mtd_read_oobs() covers mtd_read()?
> Is my understand right?
>

Yes please let's drop _read|write() instead.

Thanks,
Miquèl