staging: rtl8192u: Fix checkpatch.pl warnings in ieee80211_crypt.c
cover staging: rtl8192u: Fix checkpatch.pl warnings in ieee80211_crypt.c
This patchset clears checkpatch.pl warnings in ieee80211_crypt.c such as:
convert printk to a preferable function like netdev_dbg or pr_dbg, fix the comment line style warning, 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: Clean-up comment line style
staging: rtl8192u: Replace asm header files with linux ones.
staging: rtl8192u: Fix quoted string split across lines
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/4 staging: rtl8192u: Convert from printk into netdev_dbg or pr_dbg
Convert printk(KERN_DEBUG.. ) to netdev_dbg if its a network driver and pr_dbg if its not a driver, to fix the checkpatch.pl warning:
WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ...
--- drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c +5 -5
@@ -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
Re: [Outreachy kernel] [PATCH 1/4] staging: rtl8192u: Convert from printk into netdev_dbg or pr_dbg
Quoted 2 lines · Navya Sri Nizamkari
Convert printk(KERN_DEBUG.. ) to
netdev_dbgif its a network driver andpr_dbgif its not a driver, to fix the checkpatch.pl warning:
This message is rather confusing. The patch affects only one file, so it either is a network driver or it is not. The issue is that some functions don't have the right set of arguments that allow you to call the netdev functions.
julia
Quoted 60 lines
WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ...
Signed-off-by Navya Sri Nizamkari <[email protected]>--- drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c +5
-6@@ -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); } --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/4025a37966c3b0a3a3e210fad8740f0673ab5a92.1424538520.git.navyasri.tech%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Re: [Outreachy kernel] [PATCH 1/4] staging: rtl8192u: Convert from printk into netdev_dbg or pr_dbg
Quoted 6 lines · Julia Lawall
Quoted 2 lines · Navya Sri Nizamkari
Convert printk(KERN_DEBUG.. ) to
netdev_dbgif its a network driver andpr_dbgif its not a driver, to fix the checkpatch.pl warning:
Quoted 8 lines
This message is rather confusing. The patch affects only one file, so it either is a network driver or it is not. The issue is that some functions don't have the right set of arguments that allow you to call the netdev functions.
julia
I made the change and sent in v2 of that patch.Should I send the whole
patchset again ?
Navya
Quoted 75 lines
WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then
Review
Quoted 8 lines
pr_debug(... to printk(KERN_DEBUG ...
Signed-off-by Navya Sri Nizamkari <[email protected] <javascript:>>---
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)(quoted diff) +0
-0
b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.cdrivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c void ieee80211_crypt_deinit_handler(unsigned long
Quoted 4 lines
index 5533221..e517e81 100644
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c +0
-0@@ -66,8 +66,8 @@ void ieee80211_crypt_deinit_handler(unsigned longdata)
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c void ieee80211_crypt_deinit_handler(unsigned long data)
Quoted 4 lines
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c +0
-1spin_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 delayedcrypt "
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c void ieee80211_crypt_deinit_handler(unsigned long · line 69
Quoted 2 lines
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c +1
-1- "deletion list\n", ieee->dev->name); + netdev_dbg(ieee->dev, "entries remaining in delayedcrypt "
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c int ieee80211_register_crypto_ops(struct
Quoted 5 lines
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c +1
-0+ "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)drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c int ieee80211_register_crypto_ops(struct ieee80211_crypto_ops *ops)
Quoted 4 lines
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c +0
-1list_add (&alg->list, &hcrypt->algs);spin_unlock_irqrestore (&hcrypt->lock, flags); - printk(KERN_DEBUG "ieee80211_crypt: registered algorithm'%s'\n",
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c int ieee80211_unregister_crypto_ops(struct
Quoted 5 lines
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c +1
-0+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)drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c int ieee80211_unregister_crypto_ops(struct ieee80211_crypto_ops *ops)
Quoted 4 lines
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c +0
-1spin_unlock_irqrestore (&hcrypt->lock, flags);if (del_alg) { - printk(KERN_DEBUG "ieee80211_crypt: unregisteredalgorithm "
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c void __exit ieee80211_crypto_deinit(void) · line 235
Quoted 9 lines
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c +1
-1+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: unregisteredalgorithm "
Quoted 9 lines
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c +1
-0+pr_dbg ("ieee80211_crypt: unregistered algorithm " "'%s' (deinit)\n" , alg->ops->name);kfree (alg); }Signature · 4 lines
1.9.1 -- You received this message because you are subscribed to the GoogleGroups "outreachy-kernel" group.
Quoted 1 line
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected] <javascript:>.
Quoted 1 line
To post to this group, send email to [email protected]
<javascript:>.
Quoted 1 line
To view this discussion on the web visit
Quoted 2 lines
For more options, visit https://groups.google.com/d/optout.
Re: [Outreachy kernel] [PATCH 1/4] staging: rtl8192u: Convert from printk into netdev_dbg or pr_dbg
Quoted 18 lines · Navya Sri Nizamkari
On Saturday, February 21, 2015 at 11:21:21 PM UTC+5:30, Julia Lawall wrote:
On Sat, 21 Feb 2015, Navya Sri Nizamkari wrote:> Convert printk(KERN_DEBUG.. ) to
netdev_dbgif its a network driver
> andpr_dbgif its not a driver, to fix the checkpatch.pl warning:This message is rather confusing. The patch affects only one file, so it
either is a network driver or it is not. The issue is that some functions
don't have the right set of arguments that allow you to call the netdev
functions.
Quoted 4 lines
julia
I made the change and sent in v2 of that patch.Should I send the whole patchset again ?
Yes. (Remember to put a space after punctuation)
julia
Re: [Outreachy kernel] [PATCH 1/4] staging: rtl8192u: Convert from printk into netdev_dbg or pr_dbg
Quoted 22 lines · Julia Lawall
Quoted 3 lines · Navya Sri Nizamkari
On Saturday, February 21, 2015 at 11:21:21 PM UTC+5:30, Julia Lawall
Quoted 15 lines · wrote:
On Sat, 21 Feb 2015, Navya Sri Nizamkari wrote:
> Convert printk(KERN_DEBUG.. ) to
netdev_dbgif its a network driver
> andpr_dbgif its not a driver, to fix the checkpatch.pl warning:This message is rather confusing. The patch affects only one file, so it
either is a network driver or it is not. The issue is that some functions
don't have the right set of arguments that allow you to call the netdev
functions.
Quoted 8 lines
Quoted 4 lines
julia
I made the change and sent in v2 of that patch.Should I send the whole patchset again ?
Yes. (Remember to put a space after punctuation)
julia
Sorry about missing the space after punctuation. Thanks for the feedback.
Navya
Re: [Outreachy kernel] [PATCH 1/4] staging: rtl8192u: Convert from printk into netdev_dbg or pr_dbg
Quoted 31 lines · Navya Sri Nizamkari
Quoted 27 lines · Julia Lawall
Quoted 3 lines · Navya Sri Nizamkari
On Saturday, February 21, 2015 at 11:21:21 PM UTC+5:30, Julia Lawall
Quoted 19 lines · wrote:
On Sat, 21 Feb 2015, Navya Sri Nizamkari wrote:
> Convert printk(KERN_DEBUG.. ) to
netdev_dbgif its a network driver
> andpr_dbgif its not a driver, to fix the checkpatch.pl warning:This message is rather confusing. The patch affects only one file, so it
either is a network driver or it is not. The issue is that some functions
don't have the right set of arguments that allow you to call the netdev
functions.julia
I made the change and sent in v2 of that patch.Should I send the whole patchset again ?
Quoted 9 lines
Quoted 3 lines
Yes. (Remember to put a space after punctuation)
julia
Sorry about missing the space after punctuation. Thanks for the feedback.
Navya
I added a space after ' : ' in the cover letter of v2 by mistake, I haven't sent rest of the patches yet? Do I send a newer version?
Navya
Re: [Outreachy kernel] [PATCH 1/4] staging: rtl8192u: Convert from printk into netdev_dbg or pr_dbg
Quoted 2 lines
I added a space after ' : ' in the cover letter of v2 by mistake, I haven't sent rest of the patches yet? Do I send a newer version?
No, don't bother. The cover letter is just to be read by someone receiving the patches. It is not preserved.
julia
Re: [Outreachy kernel] staging: rtl8192u: [PATCH v2 1/4] Convert from printk into netdev_dbg or pr_dbg
In reply to Navya Sri NizamkariQuoted 3 lines · Navya Sri Nizamkari
As this is a network driver file, convert printk(KERN_DEBUG.. ) to
netdev_dbgif the calling function has arguments to support it else topr_dbg, to fix the checkpatch.pl warning:
Much better, thanks.
julia
Quoted 63 lines
WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ...
Signed-off-by Navya Sri Nizamkari <[email protected]>---
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
-6@@ -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); } --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/4025a37966c3b0a3a3e210fad8740f0673ab5a92.1424538520.git.navyasri.tech%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
PATCH 2/4 staging: rtl8192u: Clean-up comment line style
In reply to Navya Sri NizamkariConvert style of comment from C99 to C89 to fix the following checkpatch.pl error:
ERROR: "Do not use C99 // comments"
--- drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c +1 -1
@@ -11,7 +11,7 @@* */ -//#include <linux/config.h> +/* #include <linux/config.h> */ #include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
Signature · 1 line
1.9.1
Re: [Outreachy kernel] [PATCH 2/4] staging: rtl8192u: Clean-up comment line style
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c line 17
Quoted 8 lines · On Saturday 21 February 2015 23:17:41 Navya Sri Nizamkari wrote:
*
*/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c +1
-1-//#include <linux/config.h> +/* #include <linux/config.h> */ #include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
Just remove that line: the linux/config.h file is not used in modern linux versions, and the comment is just a leftover from someone trying to work around that.
Arnd
PATCH 3/4 staging: rtl8192u: Replace asm header files with linux ones.
In reply to Navya Sri NizamkariAs 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
@@ -15,8 +15,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
PATCH 4/4 staging: rtl8192u: Fix quoted string split across lines
In reply to Navya Sri NizamkariThis 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
@@ -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)) { -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); }
@@ -146,8 +146,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); }
@@ -232,8 +232,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