[patch 1/2] veth: Remove useless veth field

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Daniel Lezcano
Date: Tuesday, October 28, 2008 - 2:11 pm

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;

-- 
--
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
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 1/2] veth: Remove useless veth field, Daniel Lezcano, (Tue Oct 28, 2:11 pm)
Re: [patch 1/2] veth: Remove useless veth field, David Miller, (Tue Oct 28, 10:08 pm)