From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757641AbbLBIxr (ORCPT ); Wed, 2 Dec 2015 03:53:47 -0500 Received: from down.free-electrons.com ([37.187.137.238]:59527 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756878AbbLBIxn convert rfc822-to-8bit (ORCPT ); Wed, 2 Dec 2015 03:53:43 -0500 Date: Wed, 2 Dec 2015 09:53:40 +0100 From: Boris Brezillon To: Brian Norris Cc: David Woodhouse , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Jonathan Corbet , linux-doc@vger.kernel.org, Hartley Sweeten , Ryan Mallon , Shawn Guo , Sascha Hauer , Imre Kaloz , Krzysztof Halasa , Tony Lindgren , linux-omap@vger.kernel.org, Alexander Clouter , Thomas Petazzoni , Gregory CLEMENT , Jason Cooper , Sebastian Hesselbarth , Andrew Lunn , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Marek Vasut , Steven Miao , adi-buildroot-devel@lists.sourceforge.net, Mikael Starvik , Jesper Nilsson , linux-cris-kernel@axis.com, Josh Wu , Wan ZongShun , Ezequiel Garcia , Maxim Levitsky , Kukjin Kim , Krzysztof Kozlowski , linux-samsung-soc@vger.kernel.org, Maxime Ripard , Chen-Yu Tsai , linux-sunxi@googlegroups.com, Stefan Agner , Greg Kroah-Hartman , devel@driverdev.osuosl.org Subject: Re: [PATCH v2 17/25] mtd: nand: remove useless mtd->priv = chip assignments Message-ID: <20151202095340.2f84e80f@bbrezillon> In-Reply-To: <20151201221747.GB64635@google.com> References: <1448967802-25796-1-git-send-email-boris.brezillon@free-electrons.com> <1448967802-25796-18-git-send-email-boris.brezillon@free-electrons.com> <20151201221747.GB64635@google.com> 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 Brian, On Tue, 1 Dec 2015 14:17:47 -0800 Brian Norris wrote: > On Tue, Dec 01, 2015 at 12:03:14PM +0100, Boris Brezillon wrote: > > mtd_to_nand() now uses the container_of() approach to transform an > > mtd_info pointer into a nand_chip one. Drop useless mtd->priv > > assignments from NAND controller drivers. > > > > Signed-off-by: Boris Brezillon > > --- > > Patch generated with the following coccinelle script: > > > > ---8<---- > > virtual patch > > > > @@ > > struct mtd_info m; > > struct mtd_info *mp; > > struct nand_chip *c; > > @@ > > ( > > -(m).priv = c; > > | > > -(mp)->priv = c; > > | > > -(mp)->priv = (void *)c; > > ) > > ---8<---- > > --- > > ... > > > diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c > > index 3f29734..ed4184c 100644 > > --- a/drivers/mtd/nand/s3c2410.c > > +++ b/drivers/mtd/nand/s3c2410.c > > @@ -834,7 +834,6 @@ static void s3c2410_nand_init_chip(struct s3c2410_nand_info *info, > > chip->IO_ADDR_R = chip->IO_ADDR_W; > > > > nmtd->info = info; > > - mtd->priv = chip; > > After this one, we have: > > drivers/mtd/nand/s3c2410.c: In function ‘s3c2410_nand_init_chip’: > drivers/mtd/nand/s3c2410.c:791:19: warning: unused variable ‘mtd’ [-Wunused-variable] I fixed all the warnings/errors you pointed in patch 12 and 17 and resent a v3 only for those patches to avoid annoying all recipients again. Let me know if you want me to resend the whole patchset. Best Regards, Boris -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Brezillon Subject: Re: [PATCH v2 17/25] mtd: nand: remove useless mtd->priv = chip assignments Date: Wed, 2 Dec 2015 09:53:40 +0100 Message-ID: <20151202095340.2f84e80f@bbrezillon> References: <1448967802-25796-1-git-send-email-boris.brezillon@free-electrons.com> <1448967802-25796-18-git-send-email-boris.brezillon@free-electrons.com> <20151201221747.GB64635@google.com> Reply-To: boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20151201221747.GB64635-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Brian Norris Cc: David Woodhouse , linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Jonathan Corbet , linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Hartley Sweeten , Ryan Mallon , Shawn Guo , Sascha Hauer , Imre Kaloz , Krzysztof Halasa , Tony Lindgren , linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Alexander Clouter , Thomas Petazzoni , Gregory CLEMENT , Jason Cooper , Sebastian Hesselbarth , Andrew Lunn , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Marek List-Id: linux-omap@vger.kernel.org Hi Brian, On Tue, 1 Dec 2015 14:17:47 -0800 Brian Norris wrote: > On Tue, Dec 01, 2015 at 12:03:14PM +0100, Boris Brezillon wrote: > > mtd_to_nand() now uses the container_of() approach to transform an > > mtd_info pointer into a nand_chip one. Drop useless mtd->priv > > assignments from NAND controller drivers. > >=20 > > Signed-off-by: Boris Brezillon > > --- > > Patch generated with the following coccinelle script: > >=20 > > ---8<---- > > virtual patch > >=20 > > @@ > > struct mtd_info m; > > struct mtd_info *mp; > > struct nand_chip *c; > > @@ > > ( > > -(m).priv =3D c; > > | > > -(mp)->priv =3D c; > > | > > -(mp)->priv =3D (void *)c; > > ) > > ---8<---- > > --- >=20 > ... >=20 > > diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c > > index 3f29734..ed4184c 100644 > > --- a/drivers/mtd/nand/s3c2410.c > > +++ b/drivers/mtd/nand/s3c2410.c > > @@ -834,7 +834,6 @@ static void s3c2410_nand_init_chip(struct s3c2410_n= and_info *info, > > chip->IO_ADDR_R =3D chip->IO_ADDR_W; > > =20 > > nmtd->info =3D info; > > - mtd->priv =3D chip; >=20 > After this one, we have: >=20 > drivers/mtd/nand/s3c2410.c: In function =E2=80=98s3c2410_nand_init_chip= =E2=80=99: > drivers/mtd/nand/s3c2410.c:791:19: warning: unused variable =E2=80=98mtd= =E2=80=99 [-Wunused-variable] I fixed all the warnings/errors you pointed in patch 12 and 17 and resent a v3 only for those patches to avoid annoying all recipients again. Let me know if you want me to resend the whole patchset. Best Regards, Boris --=20 Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --=20 You received this message because you are subscribed to the Google Groups "= linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/d/optout. From mboxrd@z Thu Jan 1 00:00:00 1970 From: boris.brezillon@free-electrons.com (Boris Brezillon) Date: Wed, 2 Dec 2015 09:53:40 +0100 Subject: [PATCH v2 17/25] mtd: nand: remove useless mtd->priv = chip assignments In-Reply-To: <20151201221747.GB64635@google.com> References: <1448967802-25796-1-git-send-email-boris.brezillon@free-electrons.com> <1448967802-25796-18-git-send-email-boris.brezillon@free-electrons.com> <20151201221747.GB64635@google.com> Message-ID: <20151202095340.2f84e80f@bbrezillon> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Brian, On Tue, 1 Dec 2015 14:17:47 -0800 Brian Norris wrote: > On Tue, Dec 01, 2015 at 12:03:14PM +0100, Boris Brezillon wrote: > > mtd_to_nand() now uses the container_of() approach to transform an > > mtd_info pointer into a nand_chip one. Drop useless mtd->priv > > assignments from NAND controller drivers. > > > > Signed-off-by: Boris Brezillon > > --- > > Patch generated with the following coccinelle script: > > > > ---8<---- > > virtual patch > > > > @@ > > struct mtd_info m; > > struct mtd_info *mp; > > struct nand_chip *c; > > @@ > > ( > > -(m).priv = c; > > | > > -(mp)->priv = c; > > | > > -(mp)->priv = (void *)c; > > ) > > ---8<---- > > --- > > ... > > > diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c > > index 3f29734..ed4184c 100644 > > --- a/drivers/mtd/nand/s3c2410.c > > +++ b/drivers/mtd/nand/s3c2410.c > > @@ -834,7 +834,6 @@ static void s3c2410_nand_init_chip(struct s3c2410_nand_info *info, > > chip->IO_ADDR_R = chip->IO_ADDR_W; > > > > nmtd->info = info; > > - mtd->priv = chip; > > After this one, we have: > > drivers/mtd/nand/s3c2410.c: In function ?s3c2410_nand_init_chip?: > drivers/mtd/nand/s3c2410.c:791:19: warning: unused variable ?mtd? [-Wunused-variable] I fixed all the warnings/errors you pointed in patch 12 and 17 and resent a v3 only for those patches to avoid annoying all recipients again. Let me know if you want me to resend the whole patchset. Best Regards, Boris -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com