Commit 3717746e authored by Daniel Lezcano's avatar Daniel Lezcano Committed by David S. Miller

veth: remove unused list

The veth network device is stored in a list in the netdev private.
AFAICS, this list is never used so I removed this list from the code.
Signed-off-by: default avatarDaniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bb7bba3d
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
* *
*/ */
#include <linux/list.h>
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <linux/ethtool.h> #include <linux/ethtool.h>
#include <linux/etherdevice.h> #include <linux/etherdevice.h>
...@@ -30,13 +29,10 @@ struct veth_net_stats { ...@@ -30,13 +29,10 @@ struct veth_net_stats {
struct veth_priv { struct veth_priv {
struct net_device *peer; struct net_device *peer;
struct list_head list;
struct veth_net_stats *stats; struct veth_net_stats *stats;
unsigned ip_summed; unsigned ip_summed;
}; };
static LIST_HEAD(veth_list);
/* /*
* ethtool interface * ethtool interface
*/ */
...@@ -420,11 +416,9 @@ static int veth_newlink(struct net_device *dev, ...@@ -420,11 +416,9 @@ static int veth_newlink(struct net_device *dev,
priv = netdev_priv(dev); priv = netdev_priv(dev);
priv->peer = peer; priv->peer = peer;
list_add(&priv->list, &veth_list);
priv = netdev_priv(peer); priv = netdev_priv(peer);
priv->peer = dev; priv->peer = dev;
INIT_LIST_HEAD(&priv->list);
return 0; return 0;
err_register_dev: err_register_dev:
...@@ -446,13 +440,6 @@ static void veth_dellink(struct net_device *dev) ...@@ -446,13 +440,6 @@ static void veth_dellink(struct net_device *dev)
priv = netdev_priv(dev); priv = netdev_priv(dev);
peer = priv->peer; peer = priv->peer;
if (!list_empty(&priv->list))
list_del(&priv->list);
priv = netdev_priv(peer);
if (!list_empty(&priv->list))
list_del(&priv->list);
unregister_netdevice(dev); unregister_netdevice(dev);
unregister_netdevice(peer); unregister_netdevice(peer);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment