From: Daniel Lezcano <dlezcano@fr.ibm.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, xemul@openvz.org
Subject: [patch 2/2] veth: remove unused list
Date: Tue, 28 Oct 2008 22:11:44 +0100 [thread overview]
Message-ID: <20081028212120.658842697@fr.ibm.com> (raw)
In-Reply-To: 20081028211142.359911603@fr.ibm.com
[-- Attachment #1: remove-unused-veth-list.patch --]
[-- Type: text/plain, Size: 1411 bytes --]
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(-)
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);
}
--
next prev parent reply other threads:[~2008-10-28 21:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-28 21:11 [patch 0/2] veth: veth pair device code cleanup Daniel Lezcano
2008-10-28 21:11 ` [patch 1/2] veth: Remove useless veth field Daniel Lezcano
2008-10-29 5:08 ` David Miller
2008-10-28 21:11 ` Daniel Lezcano [this message]
2008-10-29 5:08 ` [patch 2/2] veth: remove unused list David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081028212120.658842697@fr.ibm.com \
--to=dlezcano@fr.ibm.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=xemul@openvz.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).