diff mbox

[OPW,kernel,11/13] staging: rtl8187se: prefer netdev_dbg to printk

Message ID 1382316061-31542-12-git-send-email-teobaluta@gmail.com
State New, archived
Headers show

Commit Message

Teodora Baluta Oct. 21, 2013, 12:40 a.m. UTC
This patch fixes the following checkpatch warning:

WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then
pr_debug(...  to printk(KERN_DEBUG ...

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
---
 drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Josh Triplett Oct. 21, 2013, 7:08 p.m. UTC | #1
On Mon, Oct 21, 2013 at 03:40:59AM +0300, Teodora Baluta wrote:
> This patch fixes the following checkpatch warning:
> 
> WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then
> pr_debug(...  to printk(KERN_DEBUG ...
> 
> Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
> ---
>  drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
> index b144913..48c99c3 100644
> --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
> +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
> @@ -200,7 +200,7 @@ int ieee80211_encrypt_fragment(
>  	    crypt && crypt->ops && strcmp(crypt->ops->name, "TKIP") == 0) {
>  		header = (struct ieee80211_hdr_4addr *)frag->data;
>  		if (net_ratelimit()) {
> -			printk(KERN_DEBUG "%s: TKIP countermeasures: dropped "
> +			netdev_dbg(ieee->dev, "%s: TKIP countermeasures: dropped "
>  			       "TX packet to %pM\n",
>  			       ieee->dev->name, header->addr1);

When you use netdev_*, you don't need the prefix that prints the dev
name; netdev_* will print that for you.

- Josh Triplett
diff mbox

Patch

diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
index b144913..48c99c3 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
@@ -200,7 +200,7 @@  int ieee80211_encrypt_fragment(
 	    crypt && crypt->ops && strcmp(crypt->ops->name, "TKIP") == 0) {
 		header = (struct ieee80211_hdr_4addr *)frag->data;
 		if (net_ratelimit()) {
-			printk(KERN_DEBUG "%s: TKIP countermeasures: dropped "
+			netdev_dbg(ieee->dev, "%s: TKIP countermeasures: dropped "
 			       "TX packet to %pM\n",
 			       ieee->dev->name, header->addr1);
 		}