[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210807122814.109ec082@xps13>
Date: Sat, 7 Aug 2021 12:28:14 +0200
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Zhihao Cheng <chengzhihao1@...wei.com>
Cc: <richard@....at>, <vigneshr@...com>, <bbrezillon@...nel.org>,
<linux-mtd@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
<yukuai3@...wei.com>
Subject: Re: [PATCH 2/2] mtd: mtdconcat: Remove concat_{read|write}_oob
Hi Zhihao,
Zhihao Cheng <chengzhihao1@...wei.com> 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
Powered by blists - more mailing lists