Staging: rtl8192u: ieee80211: pr_warn instead printk
PATCH 1/1 Staging: rtl8192u: ieee80211: pr_warn instead printk
This patch fixes the following warning using checkpatch.pl
WARNING: Prefer [subsystem eg: netdev]_warn([subsystem]dev, ... then dev_warn(dev, ... then pr_warn(... to printk(KERN_WARNING ...
--- drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c +7 -7
@@ -197,7 +197,7 @@ int ieee80211_encrypt_fragment(struct ieee80211_hdr_3addrqos *header; header = (struct ieee80211_hdr_3addrqos *)frag->data; -printk (KERN_DEBUG "%s: TKIP countermeasures: dropped " +pr_debug (KERN_DEBUG "%s: TKIP countermeasures: dropped " "TX packet to %pM\n" , ieee->dev->name, header->addr1); }
@@ -219,7 +219,7 @@ int ieee80211_encrypt_fragment(atomic_dec (&crypt->refcnt);if (res <0 ) { -printk (KERN_INFO "%s: Encryption failed: len=%d.\n" , +pr_info (KERN_INFO "%s: Encryption failed: len=%d.\n" , ieee->dev->name, frag->len); ieee->ieee_stats.tx_discards++;return -1 ;
@@ -623,7 +623,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)* creating it... */ if ((!ieee->hard_start_xmit && !(ieee->softmac_features &IEEE_SOFTMAC_TX_QUEUE ))|| ((!ieee->softmac_data_hard_start_xmit && (ieee->softmac_features &IEEE_SOFTMAC_TX_QUEUE )))) { -printk (KERN_WARNING "%s: No xmit handler.\n" , +pr_warn (KERN_WARNING "%s: No xmit handler.\n" , ieee->dev->name); goto success; }
@@ -631,7 +631,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)if (likely (ieee->raw_tx ==0 )){if (unlikely (skb->len <SNAP_SIZE +sizeof (u16))) { -printk (KERN_WARNING "%s: skb too small (%d).\n" , +pr_warn (KERN_WARNING "%s: skb too small (%d).\n" , ieee->dev->name, skb->len); goto success; }
@@ -747,7 +747,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)* postfix, header, FCS, etc.) */ txb =ieee80211_alloc_txb (nr_frags, frag_size + ieee->tx_headroom,GFP_ATOMIC );if (unlikely (!txb)) { -printk (KERN_WARNING "%s: Could not allocate TXB\n" , +pr_warn (KERN_WARNING "%s: Could not allocate TXB\n" , ieee->dev->name); goto failed; }
@@ -846,14 +846,14 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev) } }else {if (unlikely (skb->len <sizeof (struct ieee80211_hdr_3addr ))) { -printk (KERN_WARNING "%s: skb too small (%d).\n" , +pr_warn (KERN_WARNING "%s: skb too small (%d).\n" , ieee->dev->name, skb->len); goto success; } txb =ieee80211_alloc_txb (1 , skb->len,GFP_ATOMIC );if (!txb){ -printk (KERN_WARNING "%s: Could not allocate TXB\n" , +pr_warn (KERN_WARNING "%s: Could not allocate TXB\n" , ieee->dev->name); goto failed; }
Signature · 1 line
1.9.1
Quoted 3 lines · Hatice ERTÜRK
This patch fixes the following warning using checkpatch.pl
WARNING: Prefer [subsystem eg: netdev]_warn([subsystem]dev, ... then dev_warn(dev, ... then pr_warn(... to printk(KERN_WARNING ...
This is a network driver. In at least most of the cases it should be possible to use the netdev functions.
julia
Quoted 81 lines
Signed-off-by Hatice ERTURK <[email protected]>--- drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c +7
-8@@ -197,7 +197,7 @@ int ieee80211_encrypt_fragment(struct ieee80211_hdr_3addrqos *header; header = (struct ieee80211_hdr_3addrqos *)frag->data; -printk (KERN_DEBUG "%s: TKIP countermeasures: dropped " +pr_debug (KERN_DEBUG "%s: TKIP countermeasures: dropped " "TX packet to %pM\n" , ieee->dev->name, header->addr1); }@@ -219,7 +219,7 @@ int ieee80211_encrypt_fragment(atomic_dec (&crypt->refcnt);if (res <0 ) { -printk (KERN_INFO "%s: Encryption failed: len=%d.\n" , +pr_info (KERN_INFO "%s: Encryption failed: len=%d.\n" , ieee->dev->name, frag->len); ieee->ieee_stats.tx_discards++;return -1 ;@@ -623,7 +623,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)* creating it... */ if ((!ieee->hard_start_xmit && !(ieee->softmac_features &IEEE_SOFTMAC_TX_QUEUE ))|| ((!ieee->softmac_data_hard_start_xmit && (ieee->softmac_features &IEEE_SOFTMAC_TX_QUEUE )))) { -printk (KERN_WARNING "%s: No xmit handler.\n" , +pr_warn (KERN_WARNING "%s: No xmit handler.\n" , ieee->dev->name); goto success; }@@ -631,7 +631,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)if (likely (ieee->raw_tx ==0 )){if (unlikely (skb->len <SNAP_SIZE +sizeof (u16))) { -printk (KERN_WARNING "%s: skb too small (%d).\n" , +pr_warn (KERN_WARNING "%s: skb too small (%d).\n" , ieee->dev->name, skb->len); goto success; }@@ -747,7 +747,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)* postfix, header, FCS, etc.) */ txb =ieee80211_alloc_txb (nr_frags, frag_size + ieee->tx_headroom,GFP_ATOMIC );if (unlikely (!txb)) { -printk (KERN_WARNING "%s: Could not allocate TXB\n" , +pr_warn (KERN_WARNING "%s: Could not allocate TXB\n" , ieee->dev->name); goto failed; }@@ -846,14 +846,14 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev) } }else {if (unlikely (skb->len <sizeof (struct ieee80211_hdr_3addr ))) { -printk (KERN_WARNING "%s: skb too small (%d).\n" , +pr_warn (KERN_WARNING "%s: skb too small (%d).\n" , ieee->dev->name, skb->len); goto success; } txb =ieee80211_alloc_txb (1 , skb->len,GFP_ATOMIC );if (!txb){ -printk (KERN_WARNING "%s: Could not allocate TXB\n" , +pr_warn (KERN_WARNING "%s: Could not allocate TXB\n" , ieee->dev->name); goto failed; } --1.9.1
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1425576898-6611-1-git-send-email-haticeerturk27%40gmail.com.
For more options, visit https://groups.google.com/d/optout.