提交 c04914af 编写于 作者: J Joe Perches 提交者: David S. Miller

drivers/net/bonding: Remove unnecessary casts of netdev_priv

Signed-off-by: NJoe Perches <joe@perches.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a17531fa
...@@ -2474,8 +2474,7 @@ int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct net_device *dev, struct pac ...@@ -2474,8 +2474,7 @@ int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct net_device *dev, struct pac
goto out; goto out;
read_lock(&bond->lock); read_lock(&bond->lock);
slave = bond_get_slave_by_dev((struct bonding *)netdev_priv(dev), slave = bond_get_slave_by_dev(netdev_priv(dev), orig_dev);
orig_dev);
if (!slave) if (!slave)
goto out_unlock; goto out_unlock;
......
...@@ -286,7 +286,7 @@ static inline struct bonding *bond_get_bond_by_slave(struct slave *slave) ...@@ -286,7 +286,7 @@ static inline struct bonding *bond_get_bond_by_slave(struct slave *slave)
return NULL; 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) static inline bool bond_is_lb(const struct bonding *bond)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册