net: dsa: remove trans argument from mdb ops
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Thu, 30 Nov 2017 16:23:58 +0000 (11:23 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sun, 3 Dec 2017 02:18:56 +0000 (21:18 -0500)
The DSA switch MDB 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 MDB prepare and add operations.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/lan9303-core.c
drivers/net/dsa/microchip/ksz_common.c
drivers/net/dsa/mv88e6xxx/chip.c
include/net/dsa.h
net/dsa/switch.c

index b24566bb74d2b789d821ca35d995001b3db3c8ae..ea59dadefb337bb6b00e88d3c5c63458a214fac9 100644 (file)
@@ -1217,8 +1217,7 @@ static int lan9303_port_fdb_dump(struct dsa_switch *ds, int port,
 }
 
 static int lan9303_port_mdb_prepare(struct dsa_switch *ds, int port,
-                                   const struct switchdev_obj_port_mdb *mdb,
-                                   struct switchdev_trans *trans)
+                                   const struct switchdev_obj_port_mdb *mdb)
 {
        struct lan9303 *chip = ds->priv;
 
@@ -1235,8 +1234,7 @@ static int lan9303_port_mdb_prepare(struct dsa_switch *ds, int port,
 }
 
 static void lan9303_port_mdb_add(struct dsa_switch *ds, int port,
-                                const struct switchdev_obj_port_mdb *mdb,
-                                struct switchdev_trans *trans)
+                                const struct switchdev_obj_port_mdb *mdb)
 {
        struct lan9303 *chip = ds->priv;
 
index 25b94edc55261cd1c4f747fb471b8abc1188381a..663b0d5b982b127f934a8c87e64f5aa8209a6b0b 100644 (file)
@@ -856,16 +856,14 @@ exit:
 }
 
 static int ksz_port_mdb_prepare(struct dsa_switch *ds, int port,
-                               const struct switchdev_obj_port_mdb *mdb,
-                               struct switchdev_trans *trans)
+                               const struct switchdev_obj_port_mdb *mdb)
 {
        /* nothing to do */
        return 0;
 }
 
 static void ksz_port_mdb_add(struct dsa_switch *ds, int port,
-                            const struct switchdev_obj_port_mdb *mdb,
-                            struct switchdev_trans *trans)
+                            const struct switchdev_obj_port_mdb *mdb)
 {
        struct ksz_device *dev = ds->priv;
        u32 static_table[4];
index eff624fbd220125b3394ef7f98d7b83f64127f57..b5e0987c88f01430f2a8fd2336d156d2d7496d89 100644 (file)
@@ -3786,8 +3786,7 @@ free:
 }
 
 static int mv88e6xxx_port_mdb_prepare(struct dsa_switch *ds, int port,
-                                     const struct switchdev_obj_port_mdb *mdb,
-                                     struct switchdev_trans *trans)
+                                     const struct switchdev_obj_port_mdb *mdb)
 {
        /* We don't need any dynamic resource from the kernel (yet),
         * so skip the prepare phase.
@@ -3797,8 +3796,7 @@ static int mv88e6xxx_port_mdb_prepare(struct dsa_switch *ds, int port,
 }
 
 static void mv88e6xxx_port_mdb_add(struct dsa_switch *ds, int port,
-                                  const struct switchdev_obj_port_mdb *mdb,
-                                  struct switchdev_trans *trans)
+                                  const struct switchdev_obj_port_mdb *mdb)
 {
        struct mv88e6xxx_chip *chip = ds->priv;
 
index 0c4fbb34379e68f50d20f1496e1bddad1ab688ec..6700dff46a80747396e4037730959b0fa1188890 100644 (file)
@@ -431,12 +431,10 @@ struct dsa_switch_ops {
        /*
         * Multicast database
         */
-       int     (*port_mdb_prepare)(struct dsa_switch *ds, int port,
-                                   const struct switchdev_obj_port_mdb *mdb,
-                                   struct switchdev_trans *trans);
-       void    (*port_mdb_add)(struct dsa_switch *ds, int port,
-                               const struct switchdev_obj_port_mdb *mdb,
-                               struct switchdev_trans *trans);
+       int (*port_mdb_prepare)(struct dsa_switch *ds, int port,
+                               const struct switchdev_obj_port_mdb *mdb);
+       void (*port_mdb_add)(struct dsa_switch *ds, int port,
+                            const struct switchdev_obj_port_mdb *mdb);
        int     (*port_mdb_del)(struct dsa_switch *ds, int port,
                                const struct switchdev_obj_port_mdb *mdb);
        /*
index 205f074fa5247ad17fd5be882d3fe7eb481372ff..5ee04e9b5796c633ee4b1980e2760f353dd9ea18 100644 (file)
@@ -129,7 +129,7 @@ static int dsa_switch_mdb_add(struct dsa_switch *ds,
                        return -EOPNOTSUPP;
 
                for_each_set_bit(port, group, ds->num_ports) {
-                       err = ds->ops->port_mdb_prepare(ds, port, mdb, trans);
+                       err = ds->ops->port_mdb_prepare(ds, port, mdb);
                        if (err)
                                return err;
                }
@@ -138,7 +138,7 @@ static int dsa_switch_mdb_add(struct dsa_switch *ds,
        }
 
        for_each_set_bit(port, group, ds->num_ports)
-               ds->ops->port_mdb_add(ds, port, mdb, trans);
+               ds->ops->port_mdb_add(ds, port, mdb);
 
        return 0;
 }