LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Zhihao Cheng <chengzhihao1@huawei.com>
Cc: <richard@nod.at>, <vigneshr@ti.com>, <bbrezillon@kernel.org>,
	<linux-mtd@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
	<yukuai3@huawei.com>
Subject: Re: [PATCH 2/2] mtd: mtdconcat: Remove concat_{read|write}_oob
Date: Sat, 7 Aug 2021 12:28:14 +0200	[thread overview]
Message-ID: <20210807122814.109ec082@xps13> (raw)
In-Reply-To: <83cb21c4-0140-40d5-e0f8-7f2a7e781a5f@huawei.com>

Hi Zhihao,

Zhihao Cheng <chengzhihao1@huawei.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

  reply	other threads:[~2021-08-07 10:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-31  2:32 [PATCH 0/2] mtd: mtdconcat: Fix callback functions check Zhihao Cheng
2021-07-31  2:32 ` [PATCH 1/2] mtd: mtdconcat: Judge callback function existence getting from master for each partition Zhihao Cheng
2021-08-06 19:28   ` Miquel Raynal
2021-08-07  2:15     ` Zhihao Cheng
2021-08-07 10:32       ` Miquel Raynal
2021-08-10 11:35         ` Zhihao Cheng
2021-08-16 13:43           ` Miquel Raynal
2021-08-16 14:27   ` Miquel Raynal
2021-07-31  2:32 ` [PATCH 2/2] mtd: mtdconcat: Remove concat_{read|write}_oob Zhihao Cheng
2021-08-06 19:26   ` Miquel Raynal
2021-08-07  2:59     ` Zhihao Cheng
2021-08-07 10:28       ` Miquel Raynal [this message]
2021-08-16 14:27   ` Miquel Raynal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210807122814.109ec082@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=bbrezillon@kernel.org \
    --cc=chengzhihao1@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.com \
    --cc=yukuai3@huawei.com \
    --subject='Re: [PATCH 2/2] mtd: mtdconcat: Remove concat_{read|write}_oob' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).