From: Daniel Lezcano <dlezcano@fr.ibm.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, xemul@openvz.org
Subject: [patch 1/2] veth: Remove useless veth field
Date: Tue, 28 Oct 2008 22:11:43 +0100 [thread overview]
Message-ID: <20081028212115.952319593@fr.ibm.com> (raw)
In-Reply-To: 20081028211142.359911603@fr.ibm.com
[-- Attachment #1: remove-useless-veth-field.patch --]
[-- Type: text/plain, Size: 1013 bytes --]
The veth private structure contains a netdev pointer refering to its peer.
This field is never used and it is pointless because if we can access,
the veth_priv, that means we already have the netdev which is stored
in veth_priv->dev.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
---
drivers/net/veth.c | 3 ---
1 file changed, 3 deletions(-)
Index: net-2.6/drivers/net/veth.c
===================================================================
--- net-2.6.orig/drivers/net/veth.c
+++ net-2.6/drivers/net/veth.c
@@ -30,7 +30,6 @@ struct veth_net_stats {
struct veth_priv {
struct net_device *peer;
- struct net_device *dev;
struct list_head list;
struct veth_net_stats *stats;
unsigned ip_summed;
@@ -420,12 +419,10 @@ static int veth_newlink(struct net_devic
*/
priv = netdev_priv(dev);
- priv->dev = dev;
priv->peer = peer;
list_add(&priv->list, &veth_list);
priv = netdev_priv(peer);
- priv->dev = peer;
priv->peer = dev;
INIT_LIST_HEAD(&priv->list);
return 0;
--
next prev parent reply other threads:[~2008-10-28 21:21 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 ` Daniel Lezcano [this message]
2008-10-29 5:08 ` [patch 1/2] veth: Remove useless veth field David Miller
2008-10-28 21:11 ` [patch 2/2] veth: remove unused list Daniel Lezcano
2008-10-29 5:08 ` 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=20081028212115.952319593@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).