net: propagate upper priv via netdev_master_upper_dev_link
authorJiri Pirko <jiri@mellanox.com>
Thu, 3 Dec 2015 11:12:10 +0000 (12:12 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Dec 2015 16:49:25 +0000 (11:49 -0500)
Eliminate netdev_master_upper_dev_link_private and pass priv directly as
a parameter of netdev_master_upper_dev_link.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c
drivers/net/team/team.c
drivers/net/vrf.c
include/linux/netdevice.h
net/batman-adv/hard-interface.c
net/bridge/br_if.c
net/core/dev.c
net/openvswitch/vport-netdev.c

index 9e0f8a7ef8b1695e0b79c8324e6adfe2e0ed9f4e..924015729b2d43bd5235eb47dca4bda79a75c04b 100644 (file)
@@ -1204,7 +1204,7 @@ static int bond_master_upper_dev_link(struct net_device *bond_dev,
 {
        int err;
 
-       err = netdev_master_upper_dev_link_private(slave_dev, bond_dev, slave);
+       err = netdev_master_upper_dev_link(slave_dev, bond_dev, slave);
        if (err)
                return err;
        slave_dev->flags |= IFF_SLAVE;
index d2f3ee832c478eab0248a41974b8ff05b9637528..b37f8d14dca01000680f3ce9b47ad0ef36cb155d 100644 (file)
@@ -1083,7 +1083,7 @@ static int team_upper_dev_link(struct net_device *dev,
 {
        int err;
 
-       err = netdev_master_upper_dev_link(port_dev, dev);
+       err = netdev_master_upper_dev_link(port_dev, dev, NULL);
        if (err)
                return err;
        port_dev->priv_flags |= IFF_TEAM_PORT;
index c2d54c4ed5560e7f053799c9a3290252f9224601..59c5bddeaedd1c01beb092cd41fc1e4214dc90b2 100644 (file)
@@ -624,7 +624,7 @@ static int do_vrf_add_slave(struct net_device *dev, struct net_device *port_dev)
                goto out_fail;
        }
 
-       ret = netdev_master_upper_dev_link(port_dev, dev);
+       ret = netdev_master_upper_dev_link(port_dev, dev, NULL);
        if (ret < 0)
                goto out_unregister;
 
index 1506be58c59a58673a42d1ec5c381792aab3702e..939b8f3de8105237840b12b852eedad7d38b19a9 100644 (file)
@@ -3619,10 +3619,8 @@ struct net_device *netdev_master_upper_dev_get(struct net_device *dev);
 struct net_device *netdev_master_upper_dev_get_rcu(struct net_device *dev);
 int netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev);
 int netdev_master_upper_dev_link(struct net_device *dev,
-                                struct net_device *upper_dev);
-int netdev_master_upper_dev_link_private(struct net_device *dev,
-                                        struct net_device *upper_dev,
-                                        void *private);
+                                struct net_device *upper_dev,
+                                void *upper_priv);
 void netdev_upper_dev_unlink(struct net_device *dev,
                             struct net_device *upper_dev);
 void netdev_adjacent_rename_links(struct net_device *dev, char *oldname);
index f11345e163d7f58bc853310d681bf03229675e65..a7f4f1085dbb679cd254d88b096a5551a4672662 100644 (file)
@@ -464,7 +464,8 @@ int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface,
        hard_iface->soft_iface = soft_iface;
        bat_priv = netdev_priv(hard_iface->soft_iface);
 
-       ret = netdev_master_upper_dev_link(hard_iface->net_dev, soft_iface);
+       ret = netdev_master_upper_dev_link(hard_iface->net_dev,
+                                          soft_iface, NULL);
        if (ret)
                goto err_dev;
 
index ec02f5869a780246dd22030dfe66efa6d5e5f8da..781abc34667ace21eeb2b15a5612f3a6a92ce130 100644 (file)
@@ -493,7 +493,7 @@ int br_add_if(struct net_bridge *br, struct net_device *dev)
 
        dev->priv_flags |= IFF_BRIDGE_PORT;
 
-       err = netdev_master_upper_dev_link(dev, br->dev);
+       err = netdev_master_upper_dev_link(dev, br->dev, NULL);
        if (err)
                goto err5;
 
index 939cd1b1da1569fd785ae1667d5a53ad0cdb69f2..27d052bb78bc0894656940125c8ec7636c72b4ce 100644 (file)
@@ -5421,7 +5421,7 @@ static void __netdev_adjacent_dev_unlink_neighbour(struct net_device *dev,
 
 static int __netdev_upper_dev_link(struct net_device *dev,
                                   struct net_device *upper_dev, bool master,
-                                  void *private)
+                                  void *upper_priv)
 {
        struct netdev_notifier_changeupper_info changeupper_info;
        struct netdev_adjacent *i, *j, *to_i, *to_j;
@@ -5452,7 +5452,7 @@ static int __netdev_upper_dev_link(struct net_device *dev,
        if (ret)
                return ret;
 
-       ret = __netdev_adjacent_dev_link_neighbour(dev, upper_dev, private,
+       ret = __netdev_adjacent_dev_link_neighbour(dev, upper_dev, upper_priv,
                                                   master);
        if (ret)
                return ret;
@@ -5557,6 +5557,7 @@ EXPORT_SYMBOL(netdev_upper_dev_link);
  * netdev_master_upper_dev_link - Add a master link to the upper device
  * @dev: device
  * @upper_dev: new upper device
+ * @upper_priv: upper device private
  *
  * Adds a link to device which is upper to this one. In this case, only
  * one master upper device can be linked, although other non-master devices
@@ -5565,20 +5566,13 @@ EXPORT_SYMBOL(netdev_upper_dev_link);
  * counts are adjusted and the function returns zero.
  */
 int netdev_master_upper_dev_link(struct net_device *dev,
-                                struct net_device *upper_dev)
+                                struct net_device *upper_dev,
+                                void *upper_priv)
 {
-       return __netdev_upper_dev_link(dev, upper_dev, true, NULL);
+       return __netdev_upper_dev_link(dev, upper_dev, true, upper_priv);
 }
 EXPORT_SYMBOL(netdev_master_upper_dev_link);
 
-int netdev_master_upper_dev_link_private(struct net_device *dev,
-                                        struct net_device *upper_dev,
-                                        void *private)
-{
-       return __netdev_upper_dev_link(dev, upper_dev, true, private);
-}
-EXPORT_SYMBOL(netdev_master_upper_dev_link_private);
-
 /**
  * netdev_upper_dev_unlink - Removes a link to upper device
  * @dev: device
index b327368a3848238013cf0f6f62445569d7e29251..3ee3df1edeae11f83b63d0354a80b17da96c8ef8 100644 (file)
@@ -105,7 +105,7 @@ struct vport *ovs_netdev_link(struct vport *vport, const char *name)
 
        rtnl_lock();
        err = netdev_master_upper_dev_link(vport->dev,
-                                          get_dpdev(vport->dp));
+                                          get_dpdev(vport->dp), NULL);
        if (err)
                goto error_unlock;