aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Lezcano <dlezcano@fr.ibm.com>2008-10-29 01:08:46 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-29 02:02:33 -0400
commit3717746ef8b5a9279281b5d318496710984ed739 (patch)
treee6f4b352ca06f4f917366b85bce9e2b6a82b1da2
parentbb7bba3d56963be59bc6764c8021290ed55205ad (diff)
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: Daniel Lezcano <dlezcano@fr.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/veth.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index f7ea5bcefc2c..75b40fefc4ee 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -8,7 +8,6 @@
8 * 8 *
9 */ 9 */
10 10
11#include <linux/list.h>
12#include <linux/netdevice.h> 11#include <linux/netdevice.h>
13#include <linux/ethtool.h> 12#include <linux/ethtool.h>
14#include <linux/etherdevice.h> 13#include <linux/etherdevice.h>
@@ -30,13 +29,10 @@ struct veth_net_stats {
30 29
31struct veth_priv { 30struct veth_priv {
32 struct net_device *peer; 31 struct net_device *peer;
33 struct list_head list;
34 struct veth_net_stats *stats; 32 struct veth_net_stats *stats;
35 unsigned ip_summed; 33 unsigned ip_summed;
36}; 34};
37 35
38static LIST_HEAD(veth_list);
39
40/* 36/*
41 * ethtool interface 37 * ethtool interface
42 */ 38 */
@@ -420,11 +416,9 @@ static int veth_newlink(struct net_device *dev,
420 416
421 priv = netdev_priv(dev); 417 priv = netdev_priv(dev);
422 priv->peer = peer; 418 priv->peer = peer;
423 list_add(&priv->list, &veth_list);
424 419
425 priv = netdev_priv(peer); 420 priv = netdev_priv(peer);
426 priv->peer = dev; 421 priv->peer = dev;
427 INIT_LIST_HEAD(&priv->list);
428 return 0; 422 return 0;
429 423
430err_register_dev: 424err_register_dev:
@@ -446,13 +440,6 @@ static void veth_dellink(struct net_device *dev)
446 priv = netdev_priv(dev); 440 priv = netdev_priv(dev);
447 peer = priv->peer; 441 peer = priv->peer;
448 442
449 if (!list_empty(&priv->list))
450 list_del(&priv->list);
451
452 priv = netdev_priv(peer);
453 if (!list_empty(&priv->list))
454 list_del(&priv->list);
455
456 unregister_netdevice(dev); 443 unregister_netdevice(dev);
457 unregister_netdevice(peer); 444 unregister_netdevice(peer);
458} 445}