[OPW,kernel] Staging: wlan-ng: fix printk(KERN_DEBUG
diff mbox

Message ID 1380986242-12848-1-git-send-email-ebru.akagunduz@gmail.com
State Changes Requested
Headers show

Commit Message

Ebru Akagündüz Oct. 5, 2013, 3:17 p.m. UTC
Fix checkpatch.pl issues with prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(...  to printk(KERN_DEBUG in p80211wep.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
---
 drivers/staging/wlan-ng/p80211wep.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

Comments

Josh Triplett Oct. 5, 2013, 6:19 p.m. UTC | #1
On Sat, Oct 05, 2013 at 06:17:22PM +0300, Ebru Akagunduz wrote:
> Fix checkpatch.pl issues with prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(...  to printk(KERN_DEBUG in p80211wep.c

You need to word-wrap that line.

Also, it looks like you created an additional patch on top of the one
you originally wrote:

> --- a/drivers/staging/wlan-ng/p80211wep.c
> +++ b/drivers/staging/wlan-ng/p80211wep.c
> @@ -134,8 +134,7 @@ int wep_change_key(wlandevice_t *wlandev, int keynum, u8 *key, int keylen)
>  		return -1;
>  
>  #ifdef WEP_DEBUG
> -	pr_debug(KERN_DEBUG "WEP key %d len %d = %*phC\n", keynum, keylen,
> -			  8, key);
> +	pr_debug("WEP key %d len %d = %*phC\n", keynum, keylen, 8, key);

The original file has printk here, and your previous patch switched it
to pr_debug but left KERN_DEBUG.  Your revised patch should not assume
your original patch has been applied; PATCHv2 of a patch needs to stand
alone, without depending on v1.

- Josh Triplett

Patch
diff mbox

diff --git a/drivers/staging/wlan-ng/p80211wep.c b/drivers/staging/wlan-ng/p80211wep.c
index 174e702..4857fcf 100644
--- a/drivers/staging/wlan-ng/p80211wep.c
+++ b/drivers/staging/wlan-ng/p80211wep.c
@@ -134,8 +134,7 @@  int wep_change_key(wlandevice_t *wlandev, int keynum, u8 *key, int keylen)
 		return -1;
 
 #ifdef WEP_DEBUG
-	pr_debug(KERN_DEBUG "WEP key %d len %d = %*phC\n", keynum, keylen,
-			  8, key);
+	pr_debug("WEP key %d len %d = %*phC\n", keynum, keylen, 8, key);
 #endif
 
 	wlandev->wep_keylens[keynum] = keylen;
@@ -182,8 +181,8 @@  int wep_decrypt(wlandevice_t *wlandev, u8 *buf, u32 len, int key_override,
 	keylen += 3;		/* add in IV bytes */
 
 #ifdef WEP_DEBUG
-	pr_debug(KERN_DEBUG "D %d: %*ph (%d %d) %*phC\n", len, 3, key,
-			  keyidx, keylen, 5, key + 3);
+	pr_debug("D %d: %*ph (%d %d) %*phC\n", len, 3, key, keyidx, keylen, 5,
+		 key + 3);
 #endif
 
 	/* set up the RC4 state */
@@ -259,8 +258,8 @@  int wep_encrypt(wlandevice_t *wlandev, u8 *buf, u8 *dst, u32 len, int keynum,
 	keylen += 3;		/* add in IV bytes */
 
 #ifdef WEP_DEBUG
-	pr_debug(KERN_DEBUG "E %d (%d/%d %d) %*ph %*phC\n", len,
-			  iv[3], keynum, keylen, 3, key, 5, key + 3);
+	pr_debug("E %d (%d/%d %d) %*ph %*phC\n", len, iv[3], keynum, keylen,
+		 3, key, 5, key + 3);
 #endif
 
 	/* set up the RC4 state */