Commit bb7bba3d authored by Daniel Lezcano's avatar Daniel Lezcano Committed by David S. Miller

veth: Remove useless veth field

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: default avatarDaniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fdb46ee7
...@@ -30,7 +30,6 @@ struct veth_net_stats { ...@@ -30,7 +30,6 @@ struct veth_net_stats {
struct veth_priv { struct veth_priv {
struct net_device *peer; struct net_device *peer;
struct net_device *dev;
struct list_head list; struct list_head list;
struct veth_net_stats *stats; struct veth_net_stats *stats;
unsigned ip_summed; unsigned ip_summed;
...@@ -420,12 +419,10 @@ static int veth_newlink(struct net_device *dev, ...@@ -420,12 +419,10 @@ static int veth_newlink(struct net_device *dev,
*/ */
priv = netdev_priv(dev); priv = netdev_priv(dev);
priv->dev = dev;
priv->peer = peer; priv->peer = peer;
list_add(&priv->list, &veth_list); list_add(&priv->list, &veth_list);
priv = netdev_priv(peer); priv = netdev_priv(peer);
priv->dev = peer;
priv->peer = dev; priv->peer = dev;
INIT_LIST_HEAD(&priv->list); INIT_LIST_HEAD(&priv->list);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment