From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754288AbbI3HQB (ORCPT ); Wed, 30 Sep 2015 03:16:01 -0400 Received: from down.free-electrons.com ([37.187.137.238]:37960 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753714AbbI3HP7 convert rfc822-to-8bit (ORCPT ); Wed, 30 Sep 2015 03:15:59 -0400 Date: Wed, 30 Sep 2015 09:15:45 +0200 From: Boris Brezillon To: "Bean Huo =?UTF-8?B?6ZyN5paM5paM?= (beanhuo)" Cc: "dedekind1@gmail.com" , "adrian.hunter@intel.com" , "computersforpeace@gmail.com" , "baruch@tkos.co.il" , "asierra@xes-inc.com" , "guz.fnst@cn.fujitsu.com" , "gsi@denx.de" , "richard@nod.at" , David Woodhouse , "linux-mtd@lists.infradead.org" , "Frank Liu =?UTF-8?B?5YiY576k?= (frankliu)" , Andrea Scian , "Peter Pan =?UTF-8?B?5r2Y5qCL?= (peterpandong)" , "Karl Zhang =?UTF-8?B?5byg5Y+M6ZSj?= (karlzhang)" , Iwo Mergler , "Jeff Lauruhn (jlauruhn)" , Stefan Roese , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 1/9] drivers:nand:mtd: add support for UBI bakvol in mtd layer Message-ID: <20150930091545.57a4047e@bbrezillon> In-Reply-To: References: <20150928114008.06dcd1cd@bbrezillon> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Bean, On Wed, 30 Sep 2015 06:05:44 +0000 Bean Huo 霍斌斌 (beanhuo) 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