* [PATCH v3 0/4] staging: rtl8192u: Fix warnings in ieee80211_crypt.c
@ 2015-02-23 9:43 Navya Sri Nizamkari
2015-02-23 9:49 ` [PATCH v3 1/4] staging: rtl8192u: Convert from printk into netdev_dbg or pr_debug Navya Sri Nizamkari
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Navya Sri Nizamkari @ 2015-02-23 9:43 UTC (permalink / raw)
To: outreachy-kernel
[changes in v3]
In v3 version, the printk functions which are changed to pr_dbg
are changed to pr_debug as pr_dbg gives a 'implicit declaration of
function' warning when you build.
[changes in v2]
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: 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(-)
--
1.9.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v3 1/4] staging: rtl8192u: Convert from printk into netdev_dbg or pr_debug.
2015-02-23 9:43 [PATCH v3 0/4] staging: rtl8192u: Fix warnings in ieee80211_crypt.c Navya Sri Nizamkari
@ 2015-02-23 9:49 ` Navya Sri Nizamkari
2015-02-23 9:51 ` [PATCH v3 2/4] staging: rtl8192u: Clean-up comment line style Navya Sri Nizamkari
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Navya Sri Nizamkari @ 2015-02-23 9:49 UTC (permalink / raw)
To: outreachy-kernel
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_debug , to fix the checkpatch.pl warning:
WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then
pr_debug(... to printk(KERN_DEBUG ...
Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Changes in v2:
- Correct the commit message to be clearer.
---
Changes in v3:
- Change pr_dbg to pr_debug as it gives the following warning:
implicit declaration of function ‘pr_dbg’ and update subject
to reflect the change.
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(-)
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
index 5533221..eb89321 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
@@ -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_debug("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_debug("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_debug("ieee80211_crypt: unregistered algorithm "
"'%s' (deinit)\n", alg->ops->name);
kfree(alg);
}
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 2/4] staging: rtl8192u: Clean-up comment line style
2015-02-23 9:43 [PATCH v3 0/4] staging: rtl8192u: Fix warnings in ieee80211_crypt.c Navya Sri Nizamkari
2015-02-23 9:49 ` [PATCH v3 1/4] staging: rtl8192u: Convert from printk into netdev_dbg or pr_debug Navya Sri Nizamkari
@ 2015-02-23 9:51 ` Navya Sri Nizamkari
2015-02-23 19:46 ` [Outreachy kernel] " Jes Sorensen
2015-02-23 9:53 ` [PATCH v3 3/4] staging: rtl8192u: Replace asm header files with linux ones Navya Sri Nizamkari
2015-02-23 9:54 ` [PATCH v3 4/4] staging: rtl8192u: Fix quoted string split across lines Navya Sri Nizamkari
3 siblings, 1 reply; 9+ messages in thread
From: Navya Sri Nizamkari @ 2015-02-23 9:51 UTC (permalink / raw)
To: outreachy-kernel
Convert style of comment from C99 to C89 to fix the
following checkpatch.pl error:
ERROR: "Do not use C99 // comments"
Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
---
Changes in v3:
-None in this file of the patchset
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
index eb89321..bcb2479 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
@@ -11,7 +11,7 @@
*
*/
-//#include <linux/config.h>
+/* #include <linux/config.h> */
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 3/4] staging: rtl8192u: Replace asm header files with linux ones.
2015-02-23 9:43 [PATCH v3 0/4] staging: rtl8192u: Fix warnings in ieee80211_crypt.c Navya Sri Nizamkari
2015-02-23 9:49 ` [PATCH v3 1/4] staging: rtl8192u: Convert from printk into netdev_dbg or pr_debug Navya Sri Nizamkari
2015-02-23 9:51 ` [PATCH v3 2/4] staging: rtl8192u: Clean-up comment line style Navya Sri Nizamkari
@ 2015-02-23 9:53 ` Navya Sri Nizamkari
2015-02-23 19:47 ` [Outreachy kernel] " Jes Sorensen
2015-02-23 9:54 ` [PATCH v3 4/4] staging: rtl8192u: Fix quoted string split across lines Navya Sri Nizamkari
3 siblings, 1 reply; 9+ messages in thread
From: Navya Sri Nizamkari @ 2015-02-23 9:53 UTC (permalink / raw)
To: outreachy-kernel
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>
Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
---
Changes in v3:
-None.
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
index bcb2479..0aed175 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
@@ -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"
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 4/4] staging: rtl8192u: Fix quoted string split across lines.
2015-02-23 9:43 [PATCH v3 0/4] staging: rtl8192u: Fix warnings in ieee80211_crypt.c Navya Sri Nizamkari
` (2 preceding siblings ...)
2015-02-23 9:53 ` [PATCH v3 3/4] staging: rtl8192u: Replace asm header files with linux ones Navya Sri Nizamkari
@ 2015-02-23 9:54 ` Navya Sri Nizamkari
2015-02-23 19:49 ` [Outreachy kernel] " Jes Sorensen
3 siblings, 1 reply; 9+ messages in thread
From: Navya Sri Nizamkari @ 2015-02-23 9:54 UTC (permalink / raw)
To: outreachy-kernel
This patch fixes the checkpatch.pl warning:
WARNING: quoted string split across lines
Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
---
Changes in v3:
-None in this patch.
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
index 0aed175..c81193b 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
@@ -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_debug("ieee80211_crypt: unregistered algorithm "
- "'%s'\n", ops->name);
+ pr_debug("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_debug("ieee80211_crypt: unregistered algorithm "
- "'%s' (deinit)\n", alg->ops->name);
+ pr_debug("ieee80211_crypt: unregistered algorithm '%s' (deinit)\n",
+ alg->ops->name);
kfree(alg);
}
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Outreachy kernel] [PATCH v3 2/4] staging: rtl8192u: Clean-up comment line style
2015-02-23 9:51 ` [PATCH v3 2/4] staging: rtl8192u: Clean-up comment line style Navya Sri Nizamkari
@ 2015-02-23 19:46 ` Jes Sorensen
2015-02-26 7:26 ` Navya Sri Nizamkari
0 siblings, 1 reply; 9+ messages in thread
From: Jes Sorensen @ 2015-02-23 19:46 UTC (permalink / raw)
To: Navya Sri Nizamkari, outreachy-kernel
On 02/23/15 04:51, Navya Sri Nizamkari wrote:
> Convert style of comment from C99 to C89 to fix the
> following checkpatch.pl error:
>
> ERROR: "Do not use C99 // comments"
>
> Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
> ---
> Changes in v3:
> -None in this file of the patchset
>
> drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
> index eb89321..bcb2479 100644
> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
> @@ -11,7 +11,7 @@
> *
> */
>
> -//#include <linux/config.h>
> +/* #include <linux/config.h> */
> #include <linux/module.h>
> #include <linux/init.h>
> #include <linux/slab.h>
>
This is dead code, rather than changing the comment style, you should
remove the line completely.
Cheers,
Jes
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Outreachy kernel] [PATCH v3 3/4] staging: rtl8192u: Replace asm header files with linux ones.
2015-02-23 9:53 ` [PATCH v3 3/4] staging: rtl8192u: Replace asm header files with linux ones Navya Sri Nizamkari
@ 2015-02-23 19:47 ` Jes Sorensen
0 siblings, 0 replies; 9+ messages in thread
From: Jes Sorensen @ 2015-02-23 19:47 UTC (permalink / raw)
To: Navya Sri Nizamkari, outreachy-kernel
On 02/23/15 04:53, Navya Sri Nizamkari wrote:
> 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>
>
> Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
> ---
> Changes in v3:
> -None.
>
> drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
This part looks good.
Jes
> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
> index bcb2479..0aed175 100644
> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
> @@ -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"
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Outreachy kernel] [PATCH v3 4/4] staging: rtl8192u: Fix quoted string split across lines.
2015-02-23 9:54 ` [PATCH v3 4/4] staging: rtl8192u: Fix quoted string split across lines Navya Sri Nizamkari
@ 2015-02-23 19:49 ` Jes Sorensen
0 siblings, 0 replies; 9+ messages in thread
From: Jes Sorensen @ 2015-02-23 19:49 UTC (permalink / raw)
To: Navya Sri Nizamkari, outreachy-kernel
On 02/23/15 04:54, Navya Sri Nizamkari wrote:
> This patch fixes the checkpatch.pl warning:
>
> WARNING: quoted string split across lines
>
> Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
> ---
> Changes in v3:
> -None in this patch.
>
> drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
> index 0aed175..c81193b 100644
> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
> @@ -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");
The principle of your changes is good, but you need to get the
indentation right. If you put an argument to a function on the next
line, it needs to line up with the first argument of the function.
netdev_dbg(foo,
very_long_argument_that_should_not_break_lines);
This is the same in all the cases below as well.
Jes
> 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_debug("ieee80211_crypt: unregistered algorithm "
> - "'%s'\n", ops->name);
> + pr_debug("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_debug("ieee80211_crypt: unregistered algorithm "
> - "'%s' (deinit)\n", alg->ops->name);
> + pr_debug("ieee80211_crypt: unregistered algorithm '%s' (deinit)\n",
> + alg->ops->name);
> kfree(alg);
> }
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Outreachy kernel] [PATCH v3 2/4] staging: rtl8192u: Clean-up comment line style
2015-02-23 19:46 ` [Outreachy kernel] " Jes Sorensen
@ 2015-02-26 7:26 ` Navya Sri Nizamkari
0 siblings, 0 replies; 9+ messages in thread
From: Navya Sri Nizamkari @ 2015-02-26 7:26 UTC (permalink / raw)
To: outreachy-kernel; +Cc: navyasri.tech
[-- Attachment #1.1: Type: text/plain, Size: 1295 bytes --]
On Tuesday, February 24, 2015 at 1:16:58 AM UTC+5:30, jes.sorensen wrote:
>
> On 02/23/15 04:51, Navya Sri Nizamkari wrote:
> > Convert style of comment from C99 to C89 to fix the
> > following checkpatch.pl error:
> >
> > ERROR: "Do not use C99 // comments"
> >
> > Signed-off-by: Navya Sri Nizamkari <navyas...@gmail.com <javascript:>>
> > ---
> > Changes in v3:
> > -None in this file of the patchset
> >
> > drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
> b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
> > index eb89321..bcb2479 100644
> > --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
> > +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
> > @@ -11,7 +11,7 @@
> > *
> > */
> >
> > -//#include <linux/config.h>
> > +/* #include <linux/config.h> */
> > #include <linux/module.h>
> > #include <linux/init.h>
> > #include <linux/slab.h>
> >
>
> This is dead code, rather than changing the comment style, you should
> remove the line completely.
>
> Cheers,
> Jes
>
>
Hi,
I sent in the older version of this patch by mistake. I sent a newer
version of the patchset.
Navya
[-- Attachment #1.2: Type: text/html, Size: 1855 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-02-26 7:26 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-23 9:43 [PATCH v3 0/4] staging: rtl8192u: Fix warnings in ieee80211_crypt.c Navya Sri Nizamkari
2015-02-23 9:49 ` [PATCH v3 1/4] staging: rtl8192u: Convert from printk into netdev_dbg or pr_debug Navya Sri Nizamkari
2015-02-23 9:51 ` [PATCH v3 2/4] staging: rtl8192u: Clean-up comment line style Navya Sri Nizamkari
2015-02-23 19:46 ` [Outreachy kernel] " Jes Sorensen
2015-02-26 7:26 ` Navya Sri Nizamkari
2015-02-23 9:53 ` [PATCH v3 3/4] staging: rtl8192u: Replace asm header files with linux ones Navya Sri Nizamkari
2015-02-23 19:47 ` [Outreachy kernel] " Jes Sorensen
2015-02-23 9:54 ` [PATCH v3 4/4] staging: rtl8192u: Fix quoted string split across lines Navya Sri Nizamkari
2015-02-23 19:49 ` [Outreachy kernel] " Jes Sorensen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.