All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel@savoirfairelinux.com,
	"David S. Miller" <davem@davemloft.net>,
	Florian Fainelli <f.fainelli@gmail.com>
Subject: Re: [PATCH net-next v2 5/6] net: dsa: mv88e6xxx: add VTU ops
Date: Fri, 17 Feb 2017 22:49:09 +0100	[thread overview]
Message-ID: <20170217214909.GK6096@lunn.ch> (raw)
In-Reply-To: <20170217150531.2181-6-vivien.didelot@savoirfairelinux.com>

On Fri, Feb 17, 2017 at 10:05:30AM -0500, Vivien Didelot wrote:
> Because there are several variant of the VTU operations and because
> checking for the presence of an STU is not enough, add new ops to the
> info structure to describe the VTU operations that a chip supports.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
> ---
>  drivers/net/dsa/mv88e6xxx/chip.c      | 58 +++++++++++++++++++++++++----------
>  drivers/net/dsa/mv88e6xxx/mv88e6xxx.h |  8 ++++-
>  2 files changed, 49 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
> index 7010c3313e35..256a209eef9b 100644
> --- a/drivers/net/dsa/mv88e6xxx/chip.c
> +++ b/drivers/net/dsa/mv88e6xxx/chip.c
> @@ -1220,33 +1220,19 @@ static void mv88e6xxx_port_fast_age(struct dsa_switch *ds, int port)
>  static int mv88e6xxx_vtu_getnext(struct mv88e6xxx_chip *chip,
>  				 struct mv88e6xxx_vtu_entry *entry)
>  {
> -	int err;
> -
>  	if (!mv88e6xxx_has_vtu(chip))
>  		return -EOPNOTSUPP;
>  
> -	if (mv88e6xxx_has(chip, MV88E6XXX_FLAG_STU))
> -		err = mv88e6352_g1_vtu_getnext(chip, entry);
> -	else
> -		err = mv88e6185_g1_vtu_getnext(chip, entry);
> -
> -	return err;
> +	return chip->info->ops->vtu_getnext(chip, entry);
>  }

You appear to be taking out code you just added in the previous patch.

Please think about structuring these patches different. We want these
ops, but i don't think you have the best way of getting there.

     Andrew

  reply	other threads:[~2017-02-17 21:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-17 15:05 [PATCH net-next v2 0/6] net: dsa: mv88e6xxx: 88E6390 ATU/VTU Vivien Didelot
2017-02-17 15:05 ` [PATCH net-next v2 1/6] net: dsa: mv88e6xxx: add port mask helper Vivien Didelot
2017-02-17 21:26   ` Andrew Lunn
2017-02-17 15:05 ` [PATCH net-next v2 2/6] net: dsa: mv88e6xxx: move ATU code in its own file Vivien Didelot
2017-02-17 21:35   ` Andrew Lunn
2017-02-17 21:54     ` Vivien Didelot
2017-02-17 22:36       ` Andrew Lunn
2017-02-17 23:35         ` David Miller
2017-02-17 15:05 ` [PATCH net-next v2 3/6] net: dsa: mv88e6xxx: add support for 6390 ATU Move Vivien Didelot
2017-02-17 21:38   ` Andrew Lunn
2017-02-17 15:05 ` [PATCH net-next v2 4/6] net: dsa: mv88e6xxx: move VTU code to its own file Vivien Didelot
2017-02-17 21:46   ` Andrew Lunn
2017-02-17 15:05 ` [PATCH net-next v2 5/6] net: dsa: mv88e6xxx: add VTU ops Vivien Didelot
2017-02-17 21:49   ` Andrew Lunn [this message]
2017-02-17 15:05 ` [PATCH net-next v2 6/6] net: dsa: mv88e6xxx: add support for 6390 VTU Vivien Didelot
2017-02-17 21:53   ` Andrew Lunn

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=20170217214909.GK6096@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=kernel@savoirfairelinux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@savoirfairelinux.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.