Skip to contentSkip to conversation

staging: rtl8192u: Fix warnings in ieee80211_crypt.c

PATCH Superseded Navya Sri Nizamkari 2 participants 10 messages Feb 22, 2015 – Feb 27, 2015 Staging

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v2 cover staging: rtl8192u: Fix warnings in ieee80211_crypt.c

In v2 version of this patchset I correct the commit message of [PATCH 1/4] to be clearer and remove a comment from [PATCH 2/4] whose style was changed in version v1.

[original cover letter]
This patchset removes an unnecessary comment and clears checkpatch.pl warnings in ieee80211_crypt.c such as:
convert printk to a preferable function like netdev_dbg or pr_dbg,
replace asm header files with
linux ones, fix the quoted string split across a line.

Navya Sri Nizamkari (4):
staging: rtl8192u: Convert from printk into netdev_dbg or pr_dbg
staging: rtl8192u: Remove unnecessary comment
staging: rtl8192u : Replace asm header files with linux ones.
staging: rtl8192u: Fix quoted string split across lines

 drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 1/4 staging: rtl8192u: Convert from printk into netdev_dbg or pr_dbg

As this is a network driver file, convert printk(KERN_DEBUG.. ) to netdev_dbg if the calling function has arguments to support it else to pr_dbg , to fix the checkpatch.pl warning:

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

---
Changes in v2:
- Correct the commit message to be clearer.

 drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c +5 -5
index 5533221..e517e81 100644
@@ -66,8 +66,8 @@ void ieee80211_crypt_deinit_handler(unsigned long data)
 	spin_lock_irqsave(&ieee->lock, flags);
 	ieee80211_crypt_deinit_entries(ieee, 0);
 	if (!list_empty(&ieee->crypt_deinit_list)) {
-		printk(KERN_DEBUG "%s: entries remaining in delayed crypt "
-		       "deletion list\n", ieee->dev->name);
+		netdev_dbg(ieee->dev, "entries remaining in delayed crypt "
+		       "deletion list\n");
 		ieee->crypt_deinit_timer.expires = jiffies + HZ;
 		add_timer(&ieee->crypt_deinit_timer);
 	}
@@ -118,7 +118,7 @@ int ieee80211_register_crypto_ops(struct ieee80211_crypto_ops *ops)
 	list_add(&alg->list, &hcrypt->algs);
 	spin_unlock_irqrestore(&hcrypt->lock, flags);
 
-	printk(KERN_DEBUG "ieee80211_crypt: registered algorithm '%s'\n",
+	pr_dbg("ieee80211_crypt: registered algorithm '%s'\n",
 	       ops->name);
 
 	return 0;
@@ -146,7 +146,7 @@ int ieee80211_unregister_crypto_ops(struct ieee80211_crypto_ops *ops)
 	spin_unlock_irqrestore(&hcrypt->lock, flags);
 
 	if (del_alg) {
-		printk(KERN_DEBUG "ieee80211_crypt: unregistered algorithm "
+		pr_dbg("ieee80211_crypt: unregistered algorithm "
 		       "'%s'\n", ops->name);
 		kfree(del_alg);
 	}
@@ -232,7 +232,7 @@ void __exit ieee80211_crypto_deinit(void)
 		struct ieee80211_crypto_alg *alg =
 			(struct ieee80211_crypto_alg *) ptr;
 		list_del(ptr);
-		printk(KERN_DEBUG "ieee80211_crypt: unregistered algorithm "
+		pr_dbg("ieee80211_crypt: unregistered algorithm "
 		       "'%s' (deinit)\n", alg->ops->name);
 		kfree(alg);
 	}
Signature · 1 line
1.9.1
maintainer
#2 lore raw

Re: [Outreachy kernel] [PATCH v2 1/4] staging: rtl8192u: Convert from printk into netdev_dbg or pr_dbg

Quoted 11 lines · Navya Sri Nizamkari

As this is a network driver file, convert printk(KERN_DEBUG.. ) to netdev_dbg if the calling function has arguments to support it else to pr_dbg , to fix the checkpatch.pl warning:

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

---
Changes in v2:
- Correct the commit message to be clearer.

Doesn't apply as I think someone else made this change before you did :(

#3 lore raw

PATCH v2 2/4 staging: rtl8192u: Remove unnecessary comment

In reply to Navya Sri Nizamkari

The <linux/config.h> header file is not used anymore, so it is commented out in this file.This patch deletes that unnecessary comment.

---
Changes in v2:
- The style of a comment was changed to C99 in the last version, this version removes that comment.

 drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c +0 -1
index e517e81..cd31598 100644
@@ -11,7 +11,6 @@
  *
  */
 
-//#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/slab.h>
Signature · 1 line
1.9.1
#4 lore raw

PATCH v2 3/4 staging: rtl8192u: Replace asm header files with linux ones.

In reply to Navya Sri Nizamkari

As asm header files are included in linux header files, this patch uses <linux/string.h> instead of <asm/string.h> and <linux/errno.h> instead of <asm/errno.h> to fix checkpatch.pl errors:

ERROR: Use #include <linux/string.h> instead of <asm/string.h>
ERROR: Use #include <linux/errno.h> instead of <asm/errno.h>

---
 drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c +2 -2
index cd31598..bd1555d 100644
@@ -14,8 +14,8 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/slab.h>
-#include <asm/string.h>
-#include <asm/errno.h>
+#include <linux/string.h>
+#include <linux/errno.h>
 
 #include "ieee80211.h"
 
Signature · 1 line
1.9.1
maintainer
#5 lore raw

Re: [Outreachy kernel] [PATCH v2 3/4] staging: rtl8192u: Replace asm header files with linux ones.

Quoted 17 lines · Navya Sri Nizamkari

As asm header files are included in linux header files, this patch uses <linux/string.h> instead of <asm/string.h> and <linux/errno.h> instead of <asm/errno.h> to fix checkpatch.pl errors:

ERROR: Use #include <linux/string.h> instead of <asm/string.h>
ERROR: Use #include <linux/errno.h> instead of <asm/errno.h>

---
 drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c +0 -0
index cd31598..bd1555d 100644

drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c line 20

Quoted 9 lines
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c +2 -2
@@ -14,8 +14,8 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/slab.h>
-#include <asm/string.h>
-#include <asm/errno.h>
+#include <linux/string.h>
+#include <linux/errno.h>
 
 #include "ieee80211.h"

Doesn't apply :(

#6 lore raw

PATCH v2 4/4 staging: rtl8192u: Fix quoted string split across lines.

In reply to Navya Sri Nizamkari

This patch fixes the checkpatch.pl warning:

WARNING: quoted string split across lines

---
 drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c +6 -6
index bd1555d..d5b16a6 100644
@@ -65,8 +65,8 @@ void ieee80211_crypt_deinit_handler(unsigned long data)
 	spin_lock_irqsave(&ieee->lock, flags);
 	ieee80211_crypt_deinit_entries(ieee, 0);
 	if (!list_empty(&ieee->crypt_deinit_list)) {
-		netdev_dbg(ieee->dev, "entries remaining in delayed crypt "
-		       "deletion list\n");
+		netdev_dbg(ieee->dev,
+		       "entries remaining in delayed crypt deletion list\n");
 		ieee->crypt_deinit_timer.expires = jiffies + HZ;
 		add_timer(&ieee->crypt_deinit_timer);
 	}
@@ -145,8 +145,8 @@ int ieee80211_unregister_crypto_ops(struct ieee80211_crypto_ops *ops)
 	spin_unlock_irqrestore(&hcrypt->lock, flags);
 
 	if (del_alg) {
-		pr_dbg("ieee80211_crypt: unregistered algorithm "
-		       "'%s'\n", ops->name);
+		pr_dbg("ieee80211_crypt: unregistered algorithm '%s'\n",
+		       ops->name);
 		kfree(del_alg);
 	}
 
@@ -231,8 +231,8 @@ void __exit ieee80211_crypto_deinit(void)
 		struct ieee80211_crypto_alg *alg =
 			(struct ieee80211_crypto_alg *) ptr;
 		list_del(ptr);
-		pr_dbg("ieee80211_crypt: unregistered algorithm "
-		       "'%s' (deinit)\n", alg->ops->name);
+		pr_dbg("ieee80211_crypt: unregistered algorithm '%s' (deinit)\n",
+		       alg->ops->name);
 		kfree(alg);
 	}
 
Signature · 1 line
1.9.1
maintainer
#7 lore raw

Re: [Outreachy kernel] [PATCH v2 4/4] staging: rtl8192u: Fix quoted string split across lines.

Quoted 8 lines · Navya Sri Nizamkari

This patch fixes the checkpatch.pl warning:

WARNING: quoted string split across lines

---
 drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Also doesn't apply :(

#8 lore raw

Re: [Outreachy kernel] [PATCH v2 4/4] staging: rtl8192u: Fix quoted string split across lines.

Quoted 4 lines · gregkh
Quoted 2 lines · Navya Sri Nizamkari

This patch fixes the checkpatch.pl warning:

Quoted 9 lines
Quoted 6 lines

WARNING: quoted string split across lines

Signed-off-by Navya Sri Nizamkari <[email protected] <javascript:>>

---

 drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 12 ++++++------ 
 1 file changed, 6 insertions(+), 6 deletions(-) 

Also doesn't apply :(

Does it not apply because some has already sent in this patch or due to the indentation being wrong? For the indentation I sent a newer version of the patch if that's the problem.

Navya

maintainer
#9 lore raw

Re: [Outreachy kernel] [PATCH v2 4/4] staging: rtl8192u: Fix quoted string split across lines.

Quoted 17 lines · Navya Sri Nizamkari

On Friday, February 27, 2015 at 3:14:52 AM UTC+5:30, gregkh wrote:

    On Sun, Feb 22, 2015 at 10:13:08PM +0530, Navya Sri Nizamkari wrote:
    > This patch fixes the checkpatch.pl warning:
    >
    > WARNING: quoted string split across lines
    >
    > Signed-off-by: Navya Sri Nizamkari <[email protected]>
    > ---
    >  drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 12 ++++++------
    >  1 file changed, 6 insertions(+), 6 deletions(-)

    Also doesn't apply :(
Quoted 3 lines

Does it not apply because some has already sent in this patch or due to the indentation being wrong? For the indentation I sent a newer version of the patch if that's the problem.

I really don't remember why it didn't apply. I went through 700 patches yesterday, they are all a blur...

thanks,

greg k-h