lkml.org 
[lkml]   [2017]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next v2 5/6] net: dsa: mv88e6xxx: add VTU ops
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

\
 
 \ /
  Last update: 2017-02-17 22:49    [W:0.334 / U:0.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site