]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
net: dsa: remove trans argument from vlan ops
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Thu, 30 Nov 2017 16:23:57 +0000 (11:23 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sun, 3 Dec 2017 02:18:55 +0000 (21:18 -0500)
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: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/b53/b53_common.c
drivers/net/dsa/b53/b53_priv.h
drivers/net/dsa/dsa_loop.c
drivers/net/dsa/microchip/ksz_common.c
drivers/net/dsa/mv88e6xxx/chip.c
include/net/dsa.h
net/dsa/switch.c

index 7f26f5dafca7e6430f7e218423bf2da400a4dfa1..561b05089cb68d98313e978626db09435e06d637 100644 (file)
@@ -1029,8 +1029,7 @@ int b53_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering)
 EXPORT_SYMBOL(b53_vlan_filtering);
 
 int b53_vlan_prepare(struct dsa_switch *ds, int port,
-                    const struct switchdev_obj_port_vlan *vlan,
-                    struct switchdev_trans *trans)
+                    const struct switchdev_obj_port_vlan *vlan)
 {
        struct b53_device *dev = ds->priv;
 
@@ -1047,8 +1046,7 @@ int b53_vlan_prepare(struct dsa_switch *ds, int port,
 EXPORT_SYMBOL(b53_vlan_prepare);
 
 void b53_vlan_add(struct dsa_switch *ds, int port,
-                 const struct switchdev_obj_port_vlan *vlan,
-                 struct switchdev_trans *trans)
+                 const struct switchdev_obj_port_vlan *vlan)
 {
        struct b53_device *dev = ds->priv;
        bool untagged = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED;
index 2af0155efce2e9088ac80cf9f95803585a501da4..d954cf36ecd805b8c2a83371d3c9e443b04506fe 100644 (file)
@@ -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);
 int b53_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering);
 int b53_vlan_prepare(struct dsa_switch *ds, int port,
-                    const struct switchdev_obj_port_vlan *vlan,
-                    struct switchdev_trans *trans);
+                    const struct switchdev_obj_port_vlan *vlan);
 void b53_vlan_add(struct dsa_switch *ds, int port,
-                 const struct switchdev_obj_port_vlan *vlan,
-                 struct switchdev_trans *trans);
+                 const struct switchdev_obj_port_vlan *vlan);
 int b53_vlan_del(struct dsa_switch *ds, int port,
                 const struct switchdev_obj_port_vlan *vlan);
 int b53_fdb_add(struct dsa_switch *ds, int port,
index bb71d3d6f65b008dc5195b625ef579af848fea26..7aa84ee4e771d97b031e1e1e66910f81c1958828 100644 (file)
@@ -174,9 +174,9 @@ static int dsa_loop_port_vlan_filtering(struct dsa_switch *ds, int port,
        return 0;
 }
 
-static int dsa_loop_port_vlan_prepare(struct dsa_switch *ds, int port,
-                                     const struct switchdev_obj_port_vlan *vlan,
-                                     struct switchdev_trans *trans)
+static int
+dsa_loop_port_vlan_prepare(struct dsa_switch *ds, int port,
+                          const struct switchdev_obj_port_vlan *vlan)
 {
        struct dsa_loop_priv *ps = ds->priv;
        struct mii_bus *bus = ps->bus;
@@ -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,
-                                  const struct switchdev_obj_port_vlan *vlan,
-                                  struct switchdev_trans *trans)
+                                  const struct switchdev_obj_port_vlan *vlan)
 {
        bool untagged = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED;
        bool pvid = vlan->flags & BRIDGE_VLAN_INFO_PVID;
index b5be93a1e0df88a5fcf44dce1d85fdfb4df17ff4..25b94edc55261cd1c4f747fb471b8abc1188381a 100644 (file)
@@ -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,
-                                const struct switchdev_obj_port_vlan *vlan,
-                                struct switchdev_trans *trans)
+                                const struct switchdev_obj_port_vlan *vlan)
 {
        /* nothing needed */
 
@@ -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,
-                             const struct switchdev_obj_port_vlan *vlan,
-                             struct switchdev_trans *trans)
+                             const struct switchdev_obj_port_vlan *vlan)
 {
        struct ksz_device *dev = ds->priv;
        u32 vlan_table[3];
index 8171055fde7a0238fb2fbc691a482c211d4d8d5b..eff624fbd220125b3394ef7f98d7b83f64127f57 100644 (file)
@@ -1185,8 +1185,7 @@ static int mv88e6xxx_port_vlan_filtering(struct dsa_switch *ds, int port,
 
 static int
 mv88e6xxx_port_vlan_prepare(struct dsa_switch *ds, int port,
-                           const struct switchdev_obj_port_vlan *vlan,
-                           struct switchdev_trans *trans)
+                           const struct switchdev_obj_port_vlan *vlan)
 {
        struct mv88e6xxx_chip *chip = ds->priv;
        int err;
@@ -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,
-                                   const struct switchdev_obj_port_vlan *vlan,
-                                   struct switchdev_trans *trans)
+                                   const struct switchdev_obj_port_vlan *vlan)
 {
        struct mv88e6xxx_chip *chip = ds->priv;
        bool untagged = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED;
index 2a05738570d83c4976b764c86ecb1b12aa697896..0c4fbb34379e68f50d20f1496e1bddad1ab688ec 100644 (file)
@@ -412,12 +412,10 @@ struct dsa_switch_ops {
         */
        int     (*port_vlan_filtering)(struct dsa_switch *ds, int port,
                                       bool vlan_filtering);
-       int     (*port_vlan_prepare)(struct dsa_switch *ds, int port,
-                                    const struct switchdev_obj_port_vlan *vlan,
-                                    struct switchdev_trans *trans);
-       void    (*port_vlan_add)(struct dsa_switch *ds, int port,
-                                const struct switchdev_obj_port_vlan *vlan,
-                                struct switchdev_trans *trans);
+       int (*port_vlan_prepare)(struct dsa_switch *ds, int port,
+                                const struct switchdev_obj_port_vlan *vlan);
+       void (*port_vlan_add)(struct dsa_switch *ds, int port,
+                             const struct switchdev_obj_port_vlan *vlan);
        int     (*port_vlan_del)(struct dsa_switch *ds, int port,
                                 const struct switchdev_obj_port_vlan *vlan);
        /*
index 29608d087a7c56a9be475fca32a69f52de985f00..205f074fa5247ad17fd5be882d3fe7eb481372ff 100644 (file)
@@ -178,7 +178,7 @@ static int dsa_switch_vlan_add(struct dsa_switch *ds,
                        return -EOPNOTSUPP;
 
                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)
                                return err;
                }
@@ -187,7 +187,7 @@ static int dsa_switch_vlan_add(struct dsa_switch *ds,
        }
 
        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;
 }