IPoIB/cm: Fix warning if IPV6 is not enabled
Fix drivers/infiniband/ulp/ipoib/ipoib_cm.c:1151: warning: unused variable 'dev' by getting rid of the variable dev, which is only used if CONFIG_IPV6 is enabled, and replacing the one use of it with the value it is assigned, namely priv->dev. Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
@ -1148,7 +1148,6 @@ static void ipoib_cm_skb_reap(struct work_struct *work)
|
|||||||
{
|
{
|
||||||
struct ipoib_dev_priv *priv = container_of(work, struct ipoib_dev_priv,
|
struct ipoib_dev_priv *priv = container_of(work, struct ipoib_dev_priv,
|
||||||
cm.skb_task);
|
cm.skb_task);
|
||||||
struct net_device *dev = priv->dev;
|
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
|
|
||||||
unsigned mtu = priv->mcast_mtu;
|
unsigned mtu = priv->mcast_mtu;
|
||||||
@ -1162,7 +1161,7 @@ static void ipoib_cm_skb_reap(struct work_struct *work)
|
|||||||
icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, htonl(mtu));
|
icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, htonl(mtu));
|
||||||
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
|
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
|
||||||
else if (skb->protocol == htons(ETH_P_IPV6))
|
else if (skb->protocol == htons(ETH_P_IPV6))
|
||||||
icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, dev);
|
icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, priv->dev);
|
||||||
#endif
|
#endif
|
||||||
dev_kfree_skb_any(skb);
|
dev_kfree_skb_any(skb);
|
||||||
spin_lock_irq(&priv->tx_lock);
|
spin_lock_irq(&priv->tx_lock);
|
||||||
|
Reference in New Issue
Block a user