diff mbox

[2/2] veth: remove unused list

Message ID 20081028212120.658842697@fr.ibm.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Daniel Lezcano Oct. 28, 2008, 9:11 p.m. UTC
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>
---
 drivers/net/veth.c |   13 -------------
 1 file changed, 13 deletions(-)

Comments

David Miller Oct. 29, 2008, 5:08 a.m. UTC | #1
From: Daniel Lezcano <dlezcano@fr.ibm.com>
Date: Tue, 28 Oct 2008 22:11:44 +0100

> 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>

Also applied, thanks for these cleanups.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

Index: net-2.6/drivers/net/veth.c
===================================================================
--- net-2.6.orig/drivers/net/veth.c
+++ net-2.6/drivers/net/veth.c
@@ -8,7 +8,6 @@ 
  *
  */
 
-#include <linux/list.h>
 #include <linux/netdevice.h>
 #include <linux/ethtool.h>
 #include <linux/etherdevice.h>
@@ -30,13 +29,10 @@  struct veth_net_stats {
 
 struct veth_priv {
 	struct net_device *peer;
-	struct list_head list;
 	struct veth_net_stats *stats;
 	unsigned ip_summed;
 };
 
-static LIST_HEAD(veth_list);
-
 /*
  * ethtool interface
  */
@@ -420,11 +416,9 @@  static int veth_newlink(struct net_devic
 
 	priv = netdev_priv(dev);
 	priv->peer = peer;
-	list_add(&priv->list, &veth_list);
 
 	priv = netdev_priv(peer);
 	priv->peer = dev;
-	INIT_LIST_HEAD(&priv->list);
 	return 0;
 
 err_register_dev:
@@ -446,13 +440,6 @@  static void veth_dellink(struct net_devi
 	priv = netdev_priv(dev);
 	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(peer);
 }