Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752409AbcDOXjW (ORCPT ); Fri, 15 Apr 2016 19:39:22 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:58159 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750967AbcDOXjU (ORCPT ); Fri, 15 Apr 2016 19:39:20 -0400 Date: Sat, 16 Apr 2016 01:39:17 +0200 From: Andrew Lunn To: Vivien Didelot Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Florian Fainelli Subject: Re: [PATCH net-next v2 1/7] net: dsa: mv88e6xxx: drop double ds assignment Message-ID: <20160415233917.GA32136@lunn.ch> References: <1460762488-2633-1-git-send-email-vivien.didelot@savoirfairelinux.com> <1460762488-2633-2-git-send-email-vivien.didelot@savoirfairelinux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1460762488-2633-2-git-send-email-vivien.didelot@savoirfairelinux.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2179 Lines: 73 On Fri, Apr 15, 2016 at 07:21:22PM -0400, Vivien Didelot wrote: > Every driver assigns ps->ds even though it gets assigned in the shared > mv88e6xxx_setup_common function. Kill redundancy. > > Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Thanks Andrew > --- > drivers/net/dsa/mv88e6123.c | 2 -- > drivers/net/dsa/mv88e6131.c | 2 -- > drivers/net/dsa/mv88e6171.c | 2 -- > drivers/net/dsa/mv88e6352.c | 2 -- > 4 files changed, 8 deletions(-) > > diff --git a/drivers/net/dsa/mv88e6123.c b/drivers/net/dsa/mv88e6123.c > index c34283d..88a812d 100644 > --- a/drivers/net/dsa/mv88e6123.c > +++ b/drivers/net/dsa/mv88e6123.c > @@ -76,8 +76,6 @@ static int mv88e6123_setup(struct dsa_switch *ds) > struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); > int ret; > > - ps->ds = ds; > - > ret = mv88e6xxx_setup_common(ds); > if (ret < 0) > return ret; > diff --git a/drivers/net/dsa/mv88e6131.c b/drivers/net/dsa/mv88e6131.c > index f5d75fc..6b2bcb0 100644 > --- a/drivers/net/dsa/mv88e6131.c > +++ b/drivers/net/dsa/mv88e6131.c > @@ -94,8 +94,6 @@ static int mv88e6131_setup(struct dsa_switch *ds) > struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); > int ret; > > - ps->ds = ds; > - > ret = mv88e6xxx_setup_common(ds); > if (ret < 0) > return ret; > diff --git a/drivers/net/dsa/mv88e6171.c b/drivers/net/dsa/mv88e6171.c > index f562250..40222b0 100644 > --- a/drivers/net/dsa/mv88e6171.c > +++ b/drivers/net/dsa/mv88e6171.c > @@ -72,8 +72,6 @@ static int mv88e6171_setup(struct dsa_switch *ds) > struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); > int ret; > > - ps->ds = ds; > - > ret = mv88e6xxx_setup_common(ds); > if (ret < 0) > return ret; > diff --git a/drivers/net/dsa/mv88e6352.c b/drivers/net/dsa/mv88e6352.c > index e54ee27..dbd920e 100644 > --- a/drivers/net/dsa/mv88e6352.c > +++ b/drivers/net/dsa/mv88e6352.c > @@ -84,8 +84,6 @@ static int mv88e6352_setup(struct dsa_switch *ds) > struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); > int ret; > > - ps->ds = ds; > - > ret = mv88e6xxx_setup_common(ds); > if (ret < 0) > return ret; > -- > 2.8.0 >