Skip to content

Commit

Permalink
drivers/net/bonding: Remove unnecessary casts of netdev_priv
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Joe Perches authored and David S. Miller committed Nov 17, 2010
1 parent a17531f commit c04914a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions drivers/net/bonding/bond_3ad.c
Original file line number Diff line number Diff line change
Expand Up @@ -2474,8 +2474,7 @@ int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct net_device *dev, struct pac
goto out;

read_lock(&bond->lock);
slave = bond_get_slave_by_dev((struct bonding *)netdev_priv(dev),
orig_dev);
slave = bond_get_slave_by_dev(netdev_priv(dev), orig_dev);
if (!slave)
goto out_unlock;

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/bonding/bonding.h
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ static inline struct bonding *bond_get_bond_by_slave(struct slave *slave)
return NULL;
}

return (struct bonding *)netdev_priv(slave->dev->master);
return netdev_priv(slave->dev->master);
}

static inline bool bond_is_lb(const struct bonding *bond)
Expand Down

0 comments on commit c04914a

Please sign in to comment.