Skip to contentSkip to conversation

Staging: rtl8192u: Replace printk() with pr_debug()

PATCH Superseded Ksenija Stanojevic 3 participants 5 messages Feb 23, 2015 – Feb 26, 2015 Staging

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Staging: rtl8192u: Replace printk() with pr_debug()

For dynamic debugging pr_debug() macro is preferred over printk(), which is the raw way to print something. Issue found by checkpatch.pl.

---
v2: include only changes made to this file.

 drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c +2 -2
index 8c1bf1f..7fab680 100644
@@ -49,14 +49,14 @@ static void *prism2_wep_init(int keyidx)
 
 	priv->tx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC);
 	if (IS_ERR(priv->tx_tfm)) {
-		printk(KERN_DEBUG "ieee80211_crypt_wep: could not allocate "
+		pr_debug("ieee80211_crypt_wep: could not allocate "
 		       "crypto API arc4\n");
 		priv->tx_tfm = NULL;
 		goto fail;
 	}
 	priv->rx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC);
 	if (IS_ERR(priv->rx_tfm)) {
-		printk(KERN_DEBUG "ieee80211_crypt_wep: could not allocate "
+		pr_debug("ieee80211_crypt_wep: could not allocate "
 		       "crypto API arc4\n");
 		priv->rx_tfm = NULL;
 		goto fail;
Signature · 1 line
1.9.1
#1 lore raw
Quoted 9 lines · Ksenija Stanojevic

For dynamic debugging pr_debug() macro is preferred over printk(), which is the raw way to print something. Issue found by checkpatch.pl.

---
v2: include only changes made to this file.

 drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Looks good!

Jes

Quoted 22 lines
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c +2 -2
index 8c1bf1f..7fab680 100644
@@ -49,14 +49,14 @@ static void *prism2_wep_init(int keyidx)
 
 	priv->tx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC);
 	if (IS_ERR(priv->tx_tfm)) {
-		printk(KERN_DEBUG "ieee80211_crypt_wep: could not allocate "
+		pr_debug("ieee80211_crypt_wep: could not allocate "
 		       "crypto API arc4\n");
 		priv->tx_tfm = NULL;
 		goto fail;
 	}
 	priv->rx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC);
 	if (IS_ERR(priv->rx_tfm)) {
-		printk(KERN_DEBUG "ieee80211_crypt_wep: could not allocate "
+		pr_debug("ieee80211_crypt_wep: could not allocate "
 		       "crypto API arc4\n");
 		priv->rx_tfm = NULL;
 		goto fail;
maintainer
#2 lore raw
In reply to Ksenija Stanojevic
Quoted 19 lines · Ksenija Stanojevic

For dynamic debugging pr_debug() macro is preferred over printk(), which is the raw way to print something. Issue found by checkpatch.pl.

---
v2: include only changes made to this file.

 drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c +0 -1
index 8c1bf1f..7fab680 100644
@@ -49,14 +49,14 @@ static void *prism2_wep_init(int keyidx)
 
 	priv->tx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC);
 	if (IS_ERR(priv->tx_tfm)) {
-		printk(KERN_DEBUG "ieee80211_crypt_wep: could not allocate "

drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c static void *prism2_wep_init(int keyidx) · line 60

Quoted 10 lines
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c +2 -1
+		pr_debug("ieee80211_crypt_wep: could not allocate "
 		       "crypto API arc4\n");
 		priv->tx_tfm = NULL;
 		goto fail;
 	}
 	priv->rx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC);
 	if (IS_ERR(priv->rx_tfm)) {
-		printk(KERN_DEBUG "ieee80211_crypt_wep: could not allocate "
+		pr_debug("ieee80211_crypt_wep: could not allocate "
 		       "crypto API arc4\n");

Please use net_dbg() instead

thanks,

greg k-h

#3 lore raw
Quoted 17 lines · Greg KH
Quoted 16 lines · Ksenija Stanojevic

For dynamic debugging pr_debug() macro is preferred over printk(), which is the raw way to print something. Issue found by checkpatch.pl.

---
v2: include only changes made to this file.

 drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c +0 -0
index 8c1bf1f..7fab680 100644
@@ -49,14 +49,14 @@ static void *prism2_wep_init(int keyidx)
 
Quoted 16 lines

drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c static void *prism2_wep_init(int keyidx) · line 60

Quoted 13 lines
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c +2 -2
      priv->tx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC);
      if (IS_ERR(priv->tx_tfm)) {
-             printk(KERN_DEBUG "ieee80211_crypt_wep: could not allocate "
+             pr_debug("ieee80211_crypt_wep: could not allocate "
                     "crypto API arc4\n");
              priv->tx_tfm = NULL;
              goto fail;
      }
      priv->rx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC);
      if (IS_ERR(priv->rx_tfm)) {
-             printk(KERN_DEBUG "ieee80211_crypt_wep: could not allocate "
+             pr_debug("ieee80211_crypt_wep: could not allocate "
                     "crypto API arc4\n");

Please use net_dbg() instead

I already tried netdev_dbg, but there's no pointer to net stucture in function argument list.
Ksenija

Quoted 3 lines

thanks,

greg k-h

maintainer
#4 lore raw
Quoted 34 lines · Ksenija Stanojević
Quoted 17 lines · Greg KH
Quoted 16 lines · Ksenija Stanojevic

For dynamic debugging pr_debug() macro is preferred over printk(), which is the raw way to print something. Issue found by checkpatch.pl.

---
v2: include only changes made to this file.

 drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c +0 -0
index 8c1bf1f..7fab680 100644
@@ -49,14 +49,14 @@ static void *prism2_wep_init(int keyidx)
 
Quoted 16 lines

drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c static void *prism2_wep_init(int keyidx) · line 60

Quoted 13 lines
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c +2 -2
      priv->tx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC);
      if (IS_ERR(priv->tx_tfm)) {
-             printk(KERN_DEBUG "ieee80211_crypt_wep: could not allocate "
+             pr_debug("ieee80211_crypt_wep: could not allocate "
                     "crypto API arc4\n");
              priv->tx_tfm = NULL;
              goto fail;
      }
      priv->rx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC);
      if (IS_ERR(priv->rx_tfm)) {
-             printk(KERN_DEBUG "ieee80211_crypt_wep: could not allocate "
+             pr_debug("ieee80211_crypt_wep: could not allocate "
                     "crypto API arc4\n");

Please use net_dbg() instead

Quoted 2 lines

I already tried netdev_dbg, but there's no pointer to net stucture in function argument list.

Ok, then please resend the patch, and add that information to the changelog section, so that I and everyone else knows this.

thanks,

greg k-h