All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: rtl8192u: Replace printk() with pr_debug()
@ 2015-02-22 20:36 Ksenija Stanojevic
  2015-02-23 19:45 ` [Outreachy kernel] " Jes Sorensen
  0 siblings, 1 reply; 8+ messages in thread
From: Ksenija Stanojevic @ 2015-02-22 20:36 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: 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.

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
---
 drivers/dma/ste_dma40.c                                  | 1 +
 drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index 15d4946..8adae93 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -23,6 +23,7 @@
 #include <linux/amba/bus.h>
 #include <linux/regulator/consumer.h>
 #include <linux/platform_data/dma-ste-dma40.h>
+#include <linux/sizes.h>
 
 #include "dmaengine.h"
 #include "ste_dma40_ll.h"
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c
index 8c1bf1f..7fab680 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c
@@ -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;
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Outreachy kernel] [PATCH] Staging: rtl8192u: Replace printk() with pr_debug()
  2015-02-22 20:36 [PATCH] Staging: rtl8192u: Replace printk() with pr_debug() Ksenija Stanojevic
@ 2015-02-23 19:45 ` Jes Sorensen
  2015-02-23 19:57   ` Ksenija Stanojević
  0 siblings, 1 reply; 8+ messages in thread
From: Jes Sorensen @ 2015-02-23 19:45 UTC (permalink / raw)
  To: Ksenija Stanojevic, outreachy-kernel

On 02/22/15 15:36, Ksenija Stanojevic wrote:
> For dynamic debugging pr_debug() macro is preferred over printk(), which
> is the raw way to print something. Issue found by checkpatch.pl.
> 
> Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
> ---
>  drivers/dma/ste_dma40.c                                  | 1 +
>  drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c | 4 ++--
>  2 files changed, 3 insertions(+), 2 deletions(-)

The fix to rtl8192u is correct, but you managed to include a change to
drivers/dma/ste_dma40.c in the same patch. That is not good - you need
to repost a v2, which only includes the rtl8192u changes.

Cheers,
Jes


> diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
> index 15d4946..8adae93 100644
> --- a/drivers/dma/ste_dma40.c
> +++ b/drivers/dma/ste_dma40.c
> @@ -23,6 +23,7 @@
>  #include <linux/amba/bus.h>
>  #include <linux/regulator/consumer.h>
>  #include <linux/platform_data/dma-ste-dma40.h>
> +#include <linux/sizes.h>
>  
>  #include "dmaengine.h"
>  #include "ste_dma40_ll.h"
> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c
> index 8c1bf1f..7fab680 100644
> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c
> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c
> @@ -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;
> 



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Outreachy kernel] [PATCH] Staging: rtl8192u: Replace printk() with pr_debug()
  2015-02-23 19:45 ` [Outreachy kernel] " Jes Sorensen
@ 2015-02-23 19:57   ` Ksenija Stanojević
  2015-02-23 20:00     ` Jes Sorensen
  0 siblings, 1 reply; 8+ messages in thread
From: Ksenija Stanojević @ 2015-02-23 19:57 UTC (permalink / raw)
  To: Jes Sorensen; +Cc: outreachy-kernel

Ok, thank you for telling me. i didn't notice that I included changes
to both files!

On Mon, Feb 23, 2015 at 8:45 PM, Jes Sorensen <jes.sorensen@gmail.com> wrote:
> On 02/22/15 15:36, Ksenija Stanojevic wrote:
>> For dynamic debugging pr_debug() macro is preferred over printk(), which
>> is the raw way to print something. Issue found by checkpatch.pl.
>>
>> Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
>> ---
>>  drivers/dma/ste_dma40.c                                  | 1 +
>>  drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c | 4 ++--
>>  2 files changed, 3 insertions(+), 2 deletions(-)
>
> The fix to rtl8192u is correct, but you managed to include a change to
> drivers/dma/ste_dma40.c in the same patch. That is not good - you need
> to repost a v2, which only includes the rtl8192u changes.
>
> Cheers,
> Jes
>
>
>> diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
>> index 15d4946..8adae93 100644
>> --- a/drivers/dma/ste_dma40.c
>> +++ b/drivers/dma/ste_dma40.c
>> @@ -23,6 +23,7 @@
>>  #include <linux/amba/bus.h>
>>  #include <linux/regulator/consumer.h>
>>  #include <linux/platform_data/dma-ste-dma40.h>
>> +#include <linux/sizes.h>
>>
>>  #include "dmaengine.h"
>>  #include "ste_dma40_ll.h"
>> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c
>> index 8c1bf1f..7fab680 100644
>> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c
>> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c
>> @@ -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;
>>
>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Outreachy kernel] [PATCH] Staging: rtl8192u: Replace printk() with pr_debug()
  2015-02-23 19:57   ` Ksenija Stanojević
@ 2015-02-23 20:00     ` Jes Sorensen
  0 siblings, 0 replies; 8+ messages in thread
From: Jes Sorensen @ 2015-02-23 20:00 UTC (permalink / raw)
  To: Ksenija Stanojević; +Cc: outreachy-kernel

On 02/23/15 14:57, Ksenija Stanojević wrote:
> Ok, thank you for telling me. i didn't notice that I included changes
> to both files!

It is a good idea to inspect patch files visually before you post them
to catch such things.

Again here, please do not top-post replies in email.

Cheers,
Jes


> On Mon, Feb 23, 2015 at 8:45 PM, Jes Sorensen <jes.sorensen@gmail.com> wrote:
>> On 02/22/15 15:36, Ksenija Stanojevic wrote:
>>> For dynamic debugging pr_debug() macro is preferred over printk(), which
>>> is the raw way to print something. Issue found by checkpatch.pl.
>>>
>>> Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
>>> ---
>>>  drivers/dma/ste_dma40.c                                  | 1 +
>>>  drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c | 4 ++--
>>>  2 files changed, 3 insertions(+), 2 deletions(-)
>>
>> The fix to rtl8192u is correct, but you managed to include a change to
>> drivers/dma/ste_dma40.c in the same patch. That is not good - you need
>> to repost a v2, which only includes the rtl8192u changes.
>>
>> Cheers,
>> Jes
>>
>>
>>> diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
>>> index 15d4946..8adae93 100644
>>> --- a/drivers/dma/ste_dma40.c
>>> +++ b/drivers/dma/ste_dma40.c
>>> @@ -23,6 +23,7 @@
>>>  #include <linux/amba/bus.h>
>>>  #include <linux/regulator/consumer.h>
>>>  #include <linux/platform_data/dma-ste-dma40.h>
>>> +#include <linux/sizes.h>
>>>
>>>  #include "dmaengine.h"
>>>  #include "ste_dma40_ll.h"
>>> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c
>>> index 8c1bf1f..7fab680 100644
>>> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c
>>> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c
>>> @@ -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;
>>>
>>



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Outreachy kernel] [PATCH] Staging: rtl8192u: Replace printk() with pr_debug().
  2015-02-21  9:12 ` [Outreachy kernel] " Julia Lawall
  2015-02-21 10:04   ` Ksenija Stanojevic
@ 2015-02-21 10:18   ` Ksenija Stanojević
  1 sibling, 0 replies; 8+ messages in thread
From: Ksenija Stanojević @ 2015-02-21 10:18 UTC (permalink / raw)
  To: Julia Lawall; +Cc: outreachy-kernel

[-- Attachment #1: Type: text/plain, Size: 3568 bytes --]

On Sat, Feb 21, 2015 at 10:12 AM, Julia Lawall <julia.lawall@lip6.fr> wrote:

> On Sat, 21 Feb 2015, Ksenija Stanojevic wrote:
>
> > For dynamic debugging pr_debug() metod is preferred over printk(), which
> > is the raw way to print something. Issue found by checkpatch.pl.
>
> This is a network driver.  See if it could be possible to use netdev_dbg
> instead.
>
> julia
>
> Hi,
It seems to me that only the first out of four functions that use printk
has a pointer to a device net structure, others don't. Therefore I could
only implement one netdev_dbg().
I couldn't compile the code where all functions use net_dev() function.


> >
> > Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
> > ---
> >  drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
> b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
> > index 5533221..447af93 100644
> > --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
> > +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
> > @@ -66,7 +66,7 @@ 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 "
> > +             pr_debug("%s: entries remaining in delayed crypt "
> >                      "deletion list\n", ieee->dev->name);
> >               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
> >
> > --
> > 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 outreachy-kernel+unsubscribe@googlegroups.com.
> > To post to this group, send email to outreachy-kernel@googlegroups.com.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/outreachy-kernel/1424509708-3190-1-git-send-email-ksenija.stanojevic%40gmail.com
> .
> > For more options, visit https://groups.google.com/d/optout.
> >
>

[-- Attachment #2: Type: text/html, Size: 5432 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Outreachy kernel] [PATCH] Staging: rtl8192u: Replace printk() with pr_debug().
  2015-02-21 10:04   ` Ksenija Stanojevic
@ 2015-02-21 10:14     ` Ksenija Stanojević
  0 siblings, 0 replies; 8+ messages in thread
From: Ksenija Stanojević @ 2015-02-21 10:14 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Ksenija Stanojević

[-- Attachment #1: Type: text/plain, Size: 3839 bytes --]

On Sat, Feb 21, 2015 at 11:04 AM, Ksenija Stanojevic <
ksenija.stanojevic@gmail.com> wrote:

>
>  On Saturday, February 21, 2015 at 10:12:15 AM UTC+1, Julia Lawall wrote:
>>
>> On Sat, 21 Feb 2015, Ksenija Stanojevic wrote:
>>
>> > For dynamic debugging pr_debug() metod is preferred over printk(),
>> which
>> > is the raw way to print something. Issue found by checkpatch.pl.
>>
>> This is a network driver.  See if it could be possible to use netdev_dbg
>> instead.
>>
>> julia
>>
>>
       Hi,
       It seems to me that only the first out of four functions that use
printk has a pointer to a device net structure, others don't. Therefore I
could only implement one netdev_dbg().
       I couldn't compile the code where all functions use net_dev()
function.



>
>> > Signed-off-by: Ksenija Stanojevic <ksenija.s...@gmail.com>
>> > ---
>> >  drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 8 ++++----
>> >  1 file changed, 4 insertions(+), 4 deletions(-)
>> >
>> > diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
>> b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
>> > index 5533221..447af93 100644
>> > --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
>> > +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
>> > @@ -66,7 +66,7 @@ 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 "
>> > +                pr_debug("%s: entries remaining in delayed crypt "
>> >                         "deletion list\n", ieee->dev->name);
>> >                  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
>> >
>> > --
>> > 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 outreachy-kern...@googlegroups.com.
>> > To post to this group, send email to outreach...@googlegroups.com.
>> > To view this discussion on the web visit https://groups.google.com/d/
>> msgid/outreachy-kernel/1424509708-3190-1-git-send-
>> email-ksenija.stanojevic%40gmail.com.
>> > For more options, visit https://groups.google.com/d/optout.
>> >
>
>

[-- Attachment #2: Type: text/html, Size: 6269 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Outreachy kernel] [PATCH] Staging: rtl8192u: Replace printk() with pr_debug().
  2015-02-21  9:12 ` [Outreachy kernel] " Julia Lawall
@ 2015-02-21 10:04   ` Ksenija Stanojevic
  2015-02-21 10:14     ` Ksenija Stanojević
  2015-02-21 10:18   ` Ksenija Stanojević
  1 sibling, 1 reply; 8+ messages in thread
From: Ksenija Stanojevic @ 2015-02-21 10:04 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: ksenija.stanojevic


[-- Attachment #1.1: Type: text/plain, Size: 3762 bytes --]

Hi,
It seems to me that only the first out of four functions that use printk 
has a pointer to a device net structure, others don't. Therefore I could 
only implement one netdev_dbg(). 
I couldn't compile the code where all functions use net_dev() function.

 On Saturday, February 21, 2015 at 10:12:15 AM UTC+1, Julia Lawall wrote:
>
> On Sat, 21 Feb 2015, Ksenija Stanojevic wrote: 
>
> > For dynamic debugging pr_debug() metod is preferred over printk(), which 
> > is the raw way to print something. Issue found by checkpatch.pl. 
>
> This is a network driver.  See if it could be possible to use netdev_dbg 
> instead. 
>
> julia 
>
> > 
> > Signed-off-by: Ksenija Stanojevic <ksenija.s...@gmail.com <javascript:>> 
>
> > --- 
> >  drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 8 ++++---- 
> >  1 file changed, 4 insertions(+), 4 deletions(-) 
> > 
> > diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c 
> b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c 
> > index 5533221..447af93 100644 
> > --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c 
> > +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c 
> > @@ -66,7 +66,7 @@ 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 " 
> > +                pr_debug("%s: entries remaining in delayed crypt " 
> >                         "deletion list\n", ieee->dev->name); 
> >                  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 
> > 
> > -- 
> > 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 outreachy-kern...@googlegroups.com <javascript:>. 
> > To post to this group, send email to outreach...@googlegroups.com 
> <javascript:>. 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/outreachy-kernel/1424509708-3190-1-git-send-email-ksenija.stanojevic%40gmail.com. 
>
> > For more options, visit https://groups.google.com/d/optout. 
> > 
>

[-- Attachment #1.2: Type: text/html, Size: 6949 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Outreachy kernel] [PATCH] Staging: rtl8192u: Replace printk() with pr_debug().
  2015-02-21  9:08 Ksenija Stanojevic
@ 2015-02-21  9:12 ` Julia Lawall
  2015-02-21 10:04   ` Ksenija Stanojevic
  2015-02-21 10:18   ` Ksenija Stanojević
  0 siblings, 2 replies; 8+ messages in thread
From: Julia Lawall @ 2015-02-21  9:12 UTC (permalink / raw)
  To: Ksenija Stanojevic; +Cc: outreachy-kernel

On Sat, 21 Feb 2015, Ksenija Stanojevic wrote:

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

This is a network driver.  See if it could be possible to use netdev_dbg 
instead.

julia

> 
> Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
> ---
>  drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
> index 5533221..447af93 100644
> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
> @@ -66,7 +66,7 @@ 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 "
> +		pr_debug("%s: entries remaining in delayed crypt "
>  		       "deletion list\n", ieee->dev->name);
>  		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
> 
> -- 
> 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 outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1424509708-3190-1-git-send-email-ksenija.stanojevic%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-02-23 20:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-22 20:36 [PATCH] Staging: rtl8192u: Replace printk() with pr_debug() Ksenija Stanojevic
2015-02-23 19:45 ` [Outreachy kernel] " Jes Sorensen
2015-02-23 19:57   ` Ksenija Stanojević
2015-02-23 20:00     ` Jes Sorensen
  -- strict thread matches above, loose matches on Subject: below --
2015-02-21  9:08 Ksenija Stanojevic
2015-02-21  9:12 ` [Outreachy kernel] " Julia Lawall
2015-02-21 10:04   ` Ksenija Stanojevic
2015-02-21 10:14     ` Ksenija Stanojević
2015-02-21 10:18   ` Ksenija Stanojević

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.