mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 13:41:30 +00:00
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>
This commit is contained in:
parent
e02a06b2a7
commit
03d5fb1862
4 changed files with 7 additions and 9 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue