]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
switchdev: Complete removal of switchdev_port_attr_get()
authorFlorian Fainelli <f.fainelli@gmail.com>
Mon, 25 Feb 2019 02:39:02 +0000 (18:39 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Feb 2019 06:31:41 +0000 (22:31 -0800)
We have no more in tree users of switchdev_port_attr_get() after
d0e698d57a94 ("Merge branch 'net-Get-rid-of-switchdev_port_attr_get'")
so completely remove the function signature and body.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/switchdev.h
net/switchdev/switchdev.c

index 45310ddf2d7efdecca463ed7ce9438ab2fc16617..be4b13e666684ca433c16c241c33cb35d1b546b8 100644 (file)
@@ -115,13 +115,9 @@ typedef int switchdev_obj_dump_cb_t(struct switchdev_obj *obj);
 /**
  * struct switchdev_ops - switchdev operations
  *
- * @switchdev_port_attr_get: Get a port attribute (see switchdev_attr).
- *
  * @switchdev_port_attr_set: Set a port attribute (see switchdev_attr).
  */
 struct switchdev_ops {
-       int     (*switchdev_port_attr_get)(struct net_device *dev,
-                                          struct switchdev_attr *attr);
        int     (*switchdev_port_attr_set)(struct net_device *dev,
                                           const struct switchdev_attr *attr,
                                           struct switchdev_trans *trans);
index 7e1357db33d79451ef56f75f992250a570d213d0..362413c9b389b8f33add09087c924718b482956f 100644 (file)
@@ -174,48 +174,6 @@ static int switchdev_deferred_enqueue(struct net_device *dev,
        return 0;
 }
 
-/**
- *     switchdev_port_attr_get - Get port attribute
- *
- *     @dev: port device
- *     @attr: attribute to get
- */
-int switchdev_port_attr_get(struct net_device *dev, struct switchdev_attr *attr)
-{
-       const struct switchdev_ops *ops = dev->switchdev_ops;
-       struct net_device *lower_dev;
-       struct list_head *iter;
-       struct switchdev_attr first = {
-               .id = SWITCHDEV_ATTR_ID_UNDEFINED
-       };
-       int err = -EOPNOTSUPP;
-
-       if (ops && ops->switchdev_port_attr_get)
-               return ops->switchdev_port_attr_get(dev, attr);
-
-       if (attr->flags & SWITCHDEV_F_NO_RECURSE)
-               return err;
-
-       /* Switch device port(s) may be stacked under
-        * bond/team/vlan dev, so recurse down to get attr on
-        * each port.  Return -ENODATA if attr values don't
-        * compare across ports.
-        */
-
-       netdev_for_each_lower_dev(dev, lower_dev, iter) {
-               err = switchdev_port_attr_get(lower_dev, attr);
-               if (err)
-                       break;
-               if (first.id == SWITCHDEV_ATTR_ID_UNDEFINED)
-                       first = *attr;
-               else if (memcmp(&first, attr, sizeof(*attr)))
-                       return -ENODATA;
-       }
-
-       return err;
-}
-EXPORT_SYMBOL_GPL(switchdev_port_attr_get);
-
 static int __switchdev_port_attr_set(struct net_device *dev,
                                     const struct switchdev_attr *attr,
                                     struct switchdev_trans *trans)