diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2019-02-06 12:45:46 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-06 17:17:03 -0500 |
commit | bccb30254a4a02ee370dd23b2afbd25d7a78bc34 (patch) | |
tree | 01e04648ebb7677bbda79796c6140cb214ec9b47 /net/switchdev/switchdev.c | |
parent | 929d6c145ec4cf11482519cfd0ebf17c2fce92db (diff) |
net: Get rid of SWITCHDEV_ATTR_ID_PORT_PARENT_ID
Now that we have a dedicated NDO for getting a port's parent ID, get rid
of SWITCHDEV_ATTR_ID_PORT_PARENT_ID and convert all callers to use the
NDO exclusively. This is a preliminary change to getting rid of
switchdev_ops eventually.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/switchdev/switchdev.c')
-rw-r--r-- | net/switchdev/switchdev.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c index cd78253de31d..7e1357db33d7 100644 --- a/net/switchdev/switchdev.c +++ b/net/switchdev/switchdev.c | |||
@@ -592,26 +592,6 @@ int call_switchdev_blocking_notifiers(unsigned long val, struct net_device *dev, | |||
592 | } | 592 | } |
593 | EXPORT_SYMBOL_GPL(call_switchdev_blocking_notifiers); | 593 | EXPORT_SYMBOL_GPL(call_switchdev_blocking_notifiers); |
594 | 594 | ||
595 | bool switchdev_port_same_parent_id(struct net_device *a, | ||
596 | struct net_device *b) | ||
597 | { | ||
598 | struct switchdev_attr a_attr = { | ||
599 | .orig_dev = a, | ||
600 | .id = SWITCHDEV_ATTR_ID_PORT_PARENT_ID, | ||
601 | }; | ||
602 | struct switchdev_attr b_attr = { | ||
603 | .orig_dev = b, | ||
604 | .id = SWITCHDEV_ATTR_ID_PORT_PARENT_ID, | ||
605 | }; | ||
606 | |||
607 | if (switchdev_port_attr_get(a, &a_attr) || | ||
608 | switchdev_port_attr_get(b, &b_attr)) | ||
609 | return false; | ||
610 | |||
611 | return netdev_phys_item_id_same(&a_attr.u.ppid, &b_attr.u.ppid); | ||
612 | } | ||
613 | EXPORT_SYMBOL_GPL(switchdev_port_same_parent_id); | ||
614 | |||
615 | static int __switchdev_handle_port_obj_add(struct net_device *dev, | 595 | static int __switchdev_handle_port_obj_add(struct net_device *dev, |
616 | struct switchdev_notifier_port_obj_info *port_obj_info, | 596 | struct switchdev_notifier_port_obj_info *port_obj_info, |
617 | bool (*check_cb)(const struct net_device *dev), | 597 | bool (*check_cb)(const struct net_device *dev), |