Commit 80e02360 authored by Vivien Didelot's avatar Vivien Didelot Committed by David S. Miller

net: dsa: remove trans argument from vlan ops

The DSA switch VLAN ops pass the switchdev_trans structure down to the
drivers, but no one is using them and they aren't supposed to anyway.

Remove the trans argument from VLAN prepare and add operations.

At the same time, fix the following checkpatch warning:

    WARNING: line over 80 characters
    #74: FILE: drivers/net/dsa/dsa_loop.c:177:
    +				      const struct switchdev_obj_port_vlan *vlan)
Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 183dea58
...@@ -1029,8 +1029,7 @@ int b53_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering) ...@@ -1029,8 +1029,7 @@ int b53_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering)
EXPORT_SYMBOL(b53_vlan_filtering); EXPORT_SYMBOL(b53_vlan_filtering);
int b53_vlan_prepare(struct dsa_switch *ds, int port, int b53_vlan_prepare(struct dsa_switch *ds, int port,
const struct switchdev_obj_port_vlan *vlan, const struct switchdev_obj_port_vlan *vlan)
struct switchdev_trans *trans)
{ {
struct b53_device *dev = ds->priv; struct b53_device *dev = ds->priv;
...@@ -1047,8 +1046,7 @@ int b53_vlan_prepare(struct dsa_switch *ds, int port, ...@@ -1047,8 +1046,7 @@ int b53_vlan_prepare(struct dsa_switch *ds, int port,
EXPORT_SYMBOL(b53_vlan_prepare); EXPORT_SYMBOL(b53_vlan_prepare);
void b53_vlan_add(struct dsa_switch *ds, int port, void b53_vlan_add(struct dsa_switch *ds, int port,
const struct switchdev_obj_port_vlan *vlan, const struct switchdev_obj_port_vlan *vlan)
struct switchdev_trans *trans)
{ {
struct b53_device *dev = ds->priv; struct b53_device *dev = ds->priv;
bool untagged = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED; bool untagged = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED;
......
...@@ -295,11 +295,9 @@ void b53_br_set_stp_state(struct dsa_switch *ds, int port, u8 state); ...@@ -295,11 +295,9 @@ void b53_br_set_stp_state(struct dsa_switch *ds, int port, u8 state);
void b53_br_fast_age(struct dsa_switch *ds, int port); void b53_br_fast_age(struct dsa_switch *ds, int port);
int b53_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering); int b53_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering);
int b53_vlan_prepare(struct dsa_switch *ds, int port, int b53_vlan_prepare(struct dsa_switch *ds, int port,
const struct switchdev_obj_port_vlan *vlan, const struct switchdev_obj_port_vlan *vlan);
struct switchdev_trans *trans);
void b53_vlan_add(struct dsa_switch *ds, int port, void b53_vlan_add(struct dsa_switch *ds, int port,
const struct switchdev_obj_port_vlan *vlan, const struct switchdev_obj_port_vlan *vlan);
struct switchdev_trans *trans);
int b53_vlan_del(struct dsa_switch *ds, int port, int b53_vlan_del(struct dsa_switch *ds, int port,
const struct switchdev_obj_port_vlan *vlan); const struct switchdev_obj_port_vlan *vlan);
int b53_fdb_add(struct dsa_switch *ds, int port, int b53_fdb_add(struct dsa_switch *ds, int port,
......
...@@ -174,9 +174,9 @@ static int dsa_loop_port_vlan_filtering(struct dsa_switch *ds, int port, ...@@ -174,9 +174,9 @@ static int dsa_loop_port_vlan_filtering(struct dsa_switch *ds, int port,
return 0; return 0;
} }
static int dsa_loop_port_vlan_prepare(struct dsa_switch *ds, int port, static int
const struct switchdev_obj_port_vlan *vlan, dsa_loop_port_vlan_prepare(struct dsa_switch *ds, int port,
struct switchdev_trans *trans) const struct switchdev_obj_port_vlan *vlan)
{ {
struct dsa_loop_priv *ps = ds->priv; struct dsa_loop_priv *ps = ds->priv;
struct mii_bus *bus = ps->bus; struct mii_bus *bus = ps->bus;
...@@ -193,8 +193,7 @@ static int dsa_loop_port_vlan_prepare(struct dsa_switch *ds, int port, ...@@ -193,8 +193,7 @@ static int dsa_loop_port_vlan_prepare(struct dsa_switch *ds, int port,
} }
static void dsa_loop_port_vlan_add(struct dsa_switch *ds, int port, static void dsa_loop_port_vlan_add(struct dsa_switch *ds, int port,
const struct switchdev_obj_port_vlan *vlan, const struct switchdev_obj_port_vlan *vlan)
struct switchdev_trans *trans)
{ {
bool untagged = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED; bool untagged = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED;
bool pvid = vlan->flags & BRIDGE_VLAN_INFO_PVID; bool pvid = vlan->flags & BRIDGE_VLAN_INFO_PVID;
......
...@@ -559,8 +559,7 @@ static int ksz_port_vlan_filtering(struct dsa_switch *ds, int port, bool flag) ...@@ -559,8 +559,7 @@ static int ksz_port_vlan_filtering(struct dsa_switch *ds, int port, bool flag)
} }
static int ksz_port_vlan_prepare(struct dsa_switch *ds, int port, static int ksz_port_vlan_prepare(struct dsa_switch *ds, int port,
const struct switchdev_obj_port_vlan *vlan, const struct switchdev_obj_port_vlan *vlan)
struct switchdev_trans *trans)
{ {
/* nothing needed */ /* nothing needed */
...@@ -568,8 +567,7 @@ static int ksz_port_vlan_prepare(struct dsa_switch *ds, int port, ...@@ -568,8 +567,7 @@ static int ksz_port_vlan_prepare(struct dsa_switch *ds, int port,
} }
static void ksz_port_vlan_add(struct dsa_switch *ds, int port, static void ksz_port_vlan_add(struct dsa_switch *ds, int port,
const struct switchdev_obj_port_vlan *vlan, const struct switchdev_obj_port_vlan *vlan)
struct switchdev_trans *trans)
{ {
struct ksz_device *dev = ds->priv; struct ksz_device *dev = ds->priv;
u32 vlan_table[3]; u32 vlan_table[3];
......
...@@ -1185,8 +1185,7 @@ static int mv88e6xxx_port_vlan_filtering(struct dsa_switch *ds, int port, ...@@ -1185,8 +1185,7 @@ static int mv88e6xxx_port_vlan_filtering(struct dsa_switch *ds, int port,
static int static int
mv88e6xxx_port_vlan_prepare(struct dsa_switch *ds, int port, mv88e6xxx_port_vlan_prepare(struct dsa_switch *ds, int port,
const struct switchdev_obj_port_vlan *vlan, const struct switchdev_obj_port_vlan *vlan)
struct switchdev_trans *trans)
{ {
struct mv88e6xxx_chip *chip = ds->priv; struct mv88e6xxx_chip *chip = ds->priv;
int err; int err;
...@@ -1295,8 +1294,7 @@ static int _mv88e6xxx_port_vlan_add(struct mv88e6xxx_chip *chip, int port, ...@@ -1295,8 +1294,7 @@ static int _mv88e6xxx_port_vlan_add(struct mv88e6xxx_chip *chip, int port,
} }
static void mv88e6xxx_port_vlan_add(struct dsa_switch *ds, int port, static void mv88e6xxx_port_vlan_add(struct dsa_switch *ds, int port,
const struct switchdev_obj_port_vlan *vlan, const struct switchdev_obj_port_vlan *vlan)
struct switchdev_trans *trans)
{ {
struct mv88e6xxx_chip *chip = ds->priv; struct mv88e6xxx_chip *chip = ds->priv;
bool untagged = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED; bool untagged = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED;
......
...@@ -413,11 +413,9 @@ struct dsa_switch_ops { ...@@ -413,11 +413,9 @@ struct dsa_switch_ops {
int (*port_vlan_filtering)(struct dsa_switch *ds, int port, int (*port_vlan_filtering)(struct dsa_switch *ds, int port,
bool vlan_filtering); bool vlan_filtering);
int (*port_vlan_prepare)(struct dsa_switch *ds, int port, int (*port_vlan_prepare)(struct dsa_switch *ds, int port,
const struct switchdev_obj_port_vlan *vlan, const struct switchdev_obj_port_vlan *vlan);
struct switchdev_trans *trans);
void (*port_vlan_add)(struct dsa_switch *ds, int port, void (*port_vlan_add)(struct dsa_switch *ds, int port,
const struct switchdev_obj_port_vlan *vlan, const struct switchdev_obj_port_vlan *vlan);
struct switchdev_trans *trans);
int (*port_vlan_del)(struct dsa_switch *ds, int port, int (*port_vlan_del)(struct dsa_switch *ds, int port,
const struct switchdev_obj_port_vlan *vlan); const struct switchdev_obj_port_vlan *vlan);
/* /*
......
...@@ -178,7 +178,7 @@ static int dsa_switch_vlan_add(struct dsa_switch *ds, ...@@ -178,7 +178,7 @@ static int dsa_switch_vlan_add(struct dsa_switch *ds,
return -EOPNOTSUPP; return -EOPNOTSUPP;
for_each_set_bit(port, members, ds->num_ports) { for_each_set_bit(port, members, ds->num_ports) {
err = ds->ops->port_vlan_prepare(ds, port, vlan, trans); err = ds->ops->port_vlan_prepare(ds, port, vlan);
if (err) if (err)
return err; return err;
} }
...@@ -187,7 +187,7 @@ static int dsa_switch_vlan_add(struct dsa_switch *ds, ...@@ -187,7 +187,7 @@ static int dsa_switch_vlan_add(struct dsa_switch *ds,
} }
for_each_set_bit(port, members, ds->num_ports) for_each_set_bit(port, members, ds->num_ports)
ds->ops->port_vlan_add(ds, port, vlan, trans); ds->ops->port_vlan_add(ds, port, vlan);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment