Skip to content

Commit

Permalink
veth: Remove useless veth field
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Daniel Lezcano authored and David S. Miller committed Oct 29, 2008
1 parent fdb46ee commit bb7bba3
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/net/veth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -420,12 +419,10 @@ static int veth_newlink(struct net_device *dev,
*/

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;
Expand Down

0 comments on commit bb7bba3

Please sign in to comment.