linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: "Bean Huo 霍斌斌 (beanhuo)" <beanhuo@micron.com>
Cc: "dedekind1@gmail.com" <dedekind1@gmail.com>,
	"adrian.hunter@intel.com" <adrian.hunter@intel.com>,
	"computersforpeace@gmail.com" <computersforpeace@gmail.com>,
	"baruch@tkos.co.il" <baruch@tkos.co.il>,
	"asierra@xes-inc.com" <asierra@xes-inc.com>,
	"guz.fnst@cn.fujitsu.com" <guz.fnst@cn.fujitsu.com>,
	"gsi@denx.de" <gsi@denx.de>, "richard@nod.at" <richard@nod.at>,
	"David Woodhouse" <dwmw2@infradead.org>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"Frank Liu 刘群 (frankliu)" <frankliu@micron.com>,
	"Andrea Scian" <rnd4@dave-tech.it>,
	"Peter Pan 潘栋 (peterpandong)" <peterpandong@micron.com>,
	"Karl Zhang 张双锣 (karlzhang)" <karlzhang@micron.com>,
	"Iwo Mergler" <Iwo.Mergler@netcommwireless.com>,
	"Jeff Lauruhn (jlauruhn)" <jlauruhn@micron.com>,
	"Stefan Roese" <sr@denx.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/9] drivers:nand:mtd: add support for UBI bakvol in mtd layer
Date: Wed, 30 Sep 2015 09:15:45 +0200	[thread overview]
Message-ID: <20150930091545.57a4047e@bbrezillon> (raw)
In-Reply-To: <A765B125120D1346A63912DDE6D8B6310BF4D4F4@NTXXIAMBX02.xacn.micron.com>

Hi Bean,

On Wed, 30 Sep 2015 06:05:44 +0000
Bean Huo 霍斌斌 (beanhuo) <beanhuo@micron.com> wrote:


> > > diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index
> > > f17fa75..cfcb3a68 100644
> > > --- a/include/linux/mtd/mtd.h
> > > +++ b/include/linux/mtd/mtd.h
> > > @@ -204,6 +204,9 @@ struct mtd_info {
> > >  			  struct mtd_oob_ops *ops);
> > >  	int (*_write_oob) (struct mtd_info *mtd, loff_t to,
> > >  			   struct mtd_oob_ops *ops);
> > > +	int (*_dual_plane_write_oob) (struct mtd_info *mtd, loff_t to_plane0,
> > > +			struct mtd_oob_ops *ops_plane0, loff_t to_plane1,
> > > +					struct mtd_oob_ops *ops_plane1);
> > 
> > 
> > IMHO, if we were about to allow parallel write operations this should be
> > exposed as a more generic API, something like:
> > 
> > struct mtd_write_op {
> > 	loff_t to;
> > 	struct mtd_oob_ops ops;
> > };
> > 
> > struct mtd_multi_write_ops {
> > 	struct list_head writes;
> > };
> > 
> > int (*_multi_write)(struct mtd_info *mtd,
> > 		    struct mtd_multi_write_ops *ops);
> > 
> > Then the NAND layer could optimize that if the NAND chip supports "two-plane
> > page program", and if 2 pages in the write list are fulfilling the requirements.
> > 
> Good suggestion, I can improve it for next version patch. Thanks.
> 

Please wait for other reviews before reworking that.

> > > index 1e271cb..1da3418 100644
> > > --- a/include/linux/mtd/ubi.h
> > > +++ b/include/linux/mtd/ubi.h
> > > @@ -35,6 +35,15 @@
> > >   */
> > >  #define UBI_MAX_SG_COUNT 64
> > >
> > > +enum {
> > > +	UBI_BAKVOL_UNONE,
> > > +	UBI_BAKVOL_INIT_INFO,
> > > +	UBI_BAKVOL_INIT_INFO_DONE,
> > > +	UBI_BAKVOL_INIT_VOLUME,
> > > +	UBI_BAKVOL_INIT_VOLUME_DONE,
> > > +	UBI_BAKVOL_RUN
> > > +};
> > > +
> > 
> > Are those changes related to this patch?
> > 
> 
> Yes, maybe can simplify more.

Actually that was a rhetorical question. My point was that this enum
definition has nothing to do in this patch, and you're doing that
(mixing unrelated changes in the same commit) a lot in your other
patches.
So please make sure you correctly split your changes next time you send
a patch set.

Best Regards,

Boris

-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

      reply	other threads:[~2015-09-30  7:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-28  7:02 [PATCH 1/9] drivers:nand:mtd: add support for UBI bakvol in mtd layer Bean Huo 霍斌斌 (beanhuo)
2015-09-28  9:40 ` Boris Brezillon
2015-09-30  6:05   ` Bean Huo 霍斌斌 (beanhuo)
2015-09-30  7:15     ` Boris Brezillon [this message]

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=20150930091545.57a4047e@bbrezillon \
    --to=boris.brezillon@free-electrons.com \
    --cc=Iwo.Mergler@netcommwireless.com \
    --cc=adrian.hunter@intel.com \
    --cc=asierra@xes-inc.com \
    --cc=baruch@tkos.co.il \
    --cc=beanhuo@micron.com \
    --cc=computersforpeace@gmail.com \
    --cc=dedekind1@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=frankliu@micron.com \
    --cc=gsi@denx.de \
    --cc=guz.fnst@cn.fujitsu.com \
    --cc=jlauruhn@micron.com \
    --cc=karlzhang@micron.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=peterpandong@micron.com \
    --cc=richard@nod.at \
    --cc=rnd4@dave-tech.it \
    --cc=sr@denx.de \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).