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.dide...@savoirfairelinux.com>
---
 drivers/net/dsa/lan9303-core.c         |  6 ++----
 drivers/net/dsa/microchip/ksz_common.c |  6 ++----
 drivers/net/dsa/mv88e6xxx/chip.c       |  6 ++----
 include/net/dsa.h                      | 10 ++++------
 net/dsa/switch.c                       |  4 ++--
 5 files changed, 12 insertions(+), 20 deletions(-)

diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c
index 320651a57c6f..26dcc8f82c2e 100644
--- a/drivers/net/dsa/lan9303-core.c
+++ b/drivers/net/dsa/lan9303-core.c
@@ -1190,8 +1190,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;
 
@@ -1208,8 +1207,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;
 
diff --git a/drivers/net/dsa/microchip/ksz_common.c 
b/drivers/net/dsa/microchip/ksz_common.c
index 56cd6d365352..062a32f9ed06 100644
--- a/drivers/net/dsa/microchip/ksz_common.c
+++ b/drivers/net/dsa/microchip/ksz_common.c
@@ -857,16 +857,14 @@ static int ksz_port_fdb_dump(struct dsa_switch *ds, int 
port,
 }
 
 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];
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 09a66d4d9492..55026cc7e43c 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -3748,8 +3748,7 @@ static const char *mv88e6xxx_drv_probe(struct device 
*dsa_dev,
 }
 
 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.
@@ -3759,8 +3758,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;
 
diff --git a/include/net/dsa.h b/include/net/dsa.h
index e54332968417..d48ced87a44d 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -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);
        /*
diff --git a/net/dsa/switch.c b/net/dsa/switch.c
index e6c06aa349a6..04e8ad2c3d5d 100644
--- a/net/dsa/switch.c
+++ b/net/dsa/switch.c
@@ -129,14 +129,14 @@ 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;
                }
        }
 
        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;
 }
-- 
2.15.0

Reply via email to