summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>2015-09-29 12:07:15 -0400
committerDavid S. Miller <davem@davemloft.net>2015-09-29 21:31:59 -0700
commit03d5fb18626aff95426a380aef0d1c6904cac7c9 (patch)
treee7fe66fd345a18402ff0ce169e4f493c134f7842 /net
parente02a06b2a7c6e8b43c60ed8e0181172231af13d7 (diff)
downloadlinux-stable-03d5fb18626aff95426a380aef0d1c6904cac7c9.tar.gz
linux-stable-03d5fb18626aff95426a380aef0d1c6904cac7c9.tar.bz2
linux-stable-03d5fb18626aff95426a380aef0d1c6904cac7c9.zip
net: switchdev: remove dev from switchdev_obj cb
The net_device associated to a dump operation does not have to be passed to the callback. switchdev stores it in a superset struct, if needed. Also some drivers (such as DSA drivers) may not have easy access to it. This will simplify pushing the callback function down to the drivers. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/dsa/slave.c4
-rw-r--r--net/switchdev/switchdev.c6
2 files changed, 4 insertions, 6 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index f18cae54a5d8..0b47647961e8 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -334,7 +334,7 @@ static int dsa_slave_port_vlan_dump(struct net_device *dev,
if (test_bit(p->port, untagged))
vlan->flags |= BRIDGE_VLAN_INFO_UNTAGGED;
- err = obj->cb(dev, obj);
+ err = obj->cb(obj);
if (err)
break;
}
@@ -397,7 +397,7 @@ static int dsa_slave_port_fdb_dump(struct net_device *dev,
obj->u.fdb.vid = vid;
obj->u.fdb.ndm_state = is_static ? NUD_NOARP : NUD_REACHABLE;
- ret = obj->cb(dev, obj);
+ ret = obj->cb(obj);
if (ret < 0)
break;
}
diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
index c0e2047f8984..93f4971e68db 100644
--- a/net/switchdev/switchdev.c
+++ b/net/switchdev/switchdev.c
@@ -514,8 +514,7 @@ static int switchdev_port_vlan_dump_put(struct switchdev_vlan_dump *dump)
return 0;
}
-static int switchdev_port_vlan_dump_cb(struct net_device *dev,
- struct switchdev_obj *obj)
+static int switchdev_port_vlan_dump_cb(struct switchdev_obj *obj)
{
struct switchdev_vlan_dump *dump =
container_of(obj, struct switchdev_vlan_dump, obj);
@@ -864,8 +863,7 @@ struct switchdev_fdb_dump {
int idx;
};
-static int switchdev_port_fdb_dump_cb(struct net_device *dev,
- struct switchdev_obj *obj)
+static int switchdev_port_fdb_dump_cb(struct switchdev_obj *obj)
{
struct switchdev_fdb_dump *dump =
container_of(obj, struct switchdev_fdb_dump, obj);