Commit 0fed188f authored by Teodora Baluta's avatar Teodora Baluta Committed by Greg Kroah-Hartman

staging: rtl8187se: use netdev_warn instead of printk

This patch fixes this type of checkpatch warnings:

WARNING: Prefer netdev_warn(netdev, ... then dev_warn(dev, ... then
pr_warn(...  to printk(KERN_WARNING ...
Signed-off-by: default avatarTeodora Baluta <teobaluta@gmail.com>
Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d837ba37
...@@ -341,8 +341,7 @@ int ieee80211_rtl_xmit(struct sk_buff *skb, ...@@ -341,8 +341,7 @@ int ieee80211_rtl_xmit(struct sk_buff *skb,
!(ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE)) || !(ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE)) ||
((!ieee->softmac_data_hard_start_xmit && ((!ieee->softmac_data_hard_start_xmit &&
(ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE)))) { (ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE)))) {
printk(KERN_WARNING "%s: No xmit handler.\n", netdev_warn(ieee->dev, "No xmit handler.\n");
ieee->dev->name);
goto success; goto success;
} }
...@@ -350,8 +349,7 @@ int ieee80211_rtl_xmit(struct sk_buff *skb, ...@@ -350,8 +349,7 @@ int ieee80211_rtl_xmit(struct sk_buff *skb,
if (likely(ieee->raw_tx == 0)){ if (likely(ieee->raw_tx == 0)){
if (unlikely(skb->len < SNAP_SIZE + sizeof(u16))) { if (unlikely(skb->len < SNAP_SIZE + sizeof(u16))) {
printk(KERN_WARNING "%s: skb too small (%d).\n", netdev_warn(ieee->dev, "skb too small (%d).\n", skb->len);
ieee->dev->name, skb->len);
goto success; goto success;
} }
...@@ -475,8 +473,7 @@ int ieee80211_rtl_xmit(struct sk_buff *skb, ...@@ -475,8 +473,7 @@ int ieee80211_rtl_xmit(struct sk_buff *skb,
*/ */
txb = ieee80211_alloc_txb(nr_frags, frag_size, GFP_ATOMIC); txb = ieee80211_alloc_txb(nr_frags, frag_size, GFP_ATOMIC);
if (unlikely(!txb)) { if (unlikely(!txb)) {
printk(KERN_WARNING "%s: Could not allocate TXB\n", netdev_warn(ieee->dev, "Could not allocate TXB\n");
ieee->dev->name);
goto failed; goto failed;
} }
txb->encrypted = encrypt; txb->encrypted = encrypt;
...@@ -555,15 +552,13 @@ int ieee80211_rtl_xmit(struct sk_buff *skb, ...@@ -555,15 +552,13 @@ int ieee80211_rtl_xmit(struct sk_buff *skb,
} }
} else { } else {
if (unlikely(skb->len < sizeof(struct ieee80211_hdr_3addr))) { if (unlikely(skb->len < sizeof(struct ieee80211_hdr_3addr))) {
printk(KERN_WARNING "%s: skb too small (%d).\n", netdev_warn(ieee->dev, "skb too small (%d).\n", skb->len);
ieee->dev->name, skb->len);
goto success; goto success;
} }
txb = ieee80211_alloc_txb(1, skb->len, GFP_ATOMIC); txb = ieee80211_alloc_txb(1, skb->len, GFP_ATOMIC);
if (!txb) { if (!txb) {
printk(KERN_WARNING "%s: Could not allocate TXB\n", netdev_warn(ieee->dev, "Could not allocate TXB\n");
ieee->dev->name);
goto failed; goto failed;
} }
......
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