All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8192e: Replace printk with netdev_info
@ 2015-03-23 18:04 Marianne Moeller Knudsen
  2015-03-23 21:43 ` [Outreachy kernel] " Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: Marianne Moeller Knudsen @ 2015-03-23 18:04 UTC (permalink / raw)
  To: outreachy-kernel

Replace printk(KERN_INFO...) by netdev_info for more uniform error
reporting. Issue found by checkpatch.

Signed-off-by: Marianne Moeller Knudsen <marianne@masu.dk>
---
 drivers/staging/rtl8192e/rtl819x_TSProc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c b/drivers/staging/rtl8192e/rtl819x_TSProc.c
index c51f7e0..949cba4 100644
--- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
@@ -479,7 +479,7 @@ void RemovePeerTS(struct rtllib_device *ieee, u8 *Addr)
 
 	list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Admit_List, List) {
 		if (memcmp(pTS->Addr, Addr, 6) == 0) {
-			printk(KERN_INFO "====>remove Tx_TS_admin_list\n");
+			netdev_info(ieee->dev, "====>remove Tx_TS_admin_list\n");
 			RemoveTsEntry(ieee, pTS, TX_DIR);
 			list_del_init(&pTS->List);
 			list_add_tail(&pTS->List, &ieee->Tx_TS_Unused_List);
-- 
1.7.10.4



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

* Re: [Outreachy kernel] [PATCH] staging: rtl8192e: Replace printk with netdev_info
  2015-03-23 18:04 [PATCH] staging: rtl8192e: Replace printk with netdev_info Marianne Moeller Knudsen
@ 2015-03-23 21:43 ` Greg KH
  2015-03-26  1:33   ` Marianne Moeller Knudsen
  0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2015-03-23 21:43 UTC (permalink / raw)
  To: Marianne Moeller Knudsen; +Cc: outreachy-kernel

On Mon, Mar 23, 2015 at 07:04:24PM +0100, Marianne Moeller Knudsen wrote:
> Replace printk(KERN_INFO...) by netdev_info for more uniform error
> reporting. Issue found by checkpatch.
> 
> Signed-off-by: Marianne Moeller Knudsen <marianne@masu.dk>
> ---
>  drivers/staging/rtl8192e/rtl819x_TSProc.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c b/drivers/staging/rtl8192e/rtl819x_TSProc.c
> index c51f7e0..949cba4 100644
> --- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
> +++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
> @@ -479,7 +479,7 @@ void RemovePeerTS(struct rtllib_device *ieee, u8 *Addr)
>  
>  	list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Admit_List, List) {
>  		if (memcmp(pTS->Addr, Addr, 6) == 0) {
> -			printk(KERN_INFO "====>remove Tx_TS_admin_list\n");
> +			netdev_info(ieee->dev, "====>remove Tx_TS_admin_list\n");
>  			RemoveTsEntry(ieee, pTS, TX_DIR);
>  			list_del_init(&pTS->List);
>  			list_add_tail(&pTS->List, &ieee->Tx_TS_Unused_List);

Someone already sent this patch before you did :(


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

* Re: [Outreachy kernel] [PATCH] staging: rtl8192e: Replace printk with netdev_info
  2015-03-23 21:43 ` [Outreachy kernel] " Greg KH
@ 2015-03-26  1:33   ` Marianne Moeller Knudsen
  2015-03-26 13:27     ` Julia Lawall
  0 siblings, 1 reply; 6+ messages in thread
From: Marianne Moeller Knudsen @ 2015-03-26  1:33 UTC (permalink / raw)
  To: Greg KH; +Cc: outreachy-kernel

On Mon, Mar 23, 2015 at 10:43:02PM +0100, Greg KH wrote:
> On Mon, Mar 23, 2015 at 07:04:24PM +0100, Marianne Moeller Knudsen wrote:
> > Replace printk(KERN_INFO...) by netdev_info for more uniform error
> > reporting. Issue found by checkpatch.
> > 
> > Signed-off-by: Marianne Moeller Knudsen <marianne@masu.dk>
> > ---
> >  drivers/staging/rtl8192e/rtl819x_TSProc.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c b/drivers/staging/rtl8192e/rtl819x_TSProc.c
> > index c51f7e0..949cba4 100644
> > --- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
> > +++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
> > @@ -479,7 +479,7 @@ void RemovePeerTS(struct rtllib_device *ieee, u8 *Addr)
> >  
> >  	list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Admit_List, List) {
> >  		if (memcmp(pTS->Addr, Addr, 6) == 0) {
> > -			printk(KERN_INFO "====>remove Tx_TS_admin_list\n");
> > +			netdev_info(ieee->dev, "====>remove Tx_TS_admin_list\n");
> >  			RemoveTsEntry(ieee, pTS, TX_DIR);
> >  			list_del_init(&pTS->List);
> >  			list_add_tail(&pTS->List, &ieee->Tx_TS_Unused_List);
> 
> Someone already sent this patch before you did :(

Out of curiosity: All the other prints in this file uses RTLLIB_DEBUG. Could it be assumed
that they could be used here as well? Something like RTLLIB_DEBUG(RLTLIB_DL_TS,
....)?


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

* Re: [Outreachy kernel] [PATCH] staging: rtl8192e: Replace printk with netdev_info
  2015-03-26 13:27     ` Julia Lawall
@ 2015-03-26  3:55       ` Marianne Moeller Knudsen
  2015-03-26 19:10       ` Jes Sorensen
  1 sibling, 0 replies; 6+ messages in thread
From: Marianne Moeller Knudsen @ 2015-03-26  3:55 UTC (permalink / raw)
  To: Julia Lawall; +Cc: Greg KH, outreachy-kernel

On Thu, Mar 26, 2015 at 02:27:38PM +0100, Julia Lawall wrote:
> 
> 
> On Thu, 26 Mar 2015, Marianne Moeller Knudsen wrote:
> 
> > On Mon, Mar 23, 2015 at 10:43:02PM +0100, Greg KH wrote:
> > > On Mon, Mar 23, 2015 at 07:04:24PM +0100, Marianne Moeller Knudsen wrote:
> > > > Replace printk(KERN_INFO...) by netdev_info for more uniform error
> > > > reporting. Issue found by checkpatch.
> > > >
> > > > Signed-off-by: Marianne Moeller Knudsen <marianne@masu.dk>
> > > > ---
> > > >  drivers/staging/rtl8192e/rtl819x_TSProc.c |    2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c b/drivers/staging/rtl8192e/rtl819x_TSProc.c
> > > > index c51f7e0..949cba4 100644
> > > > --- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
> > > > +++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
> > > > @@ -479,7 +479,7 @@ void RemovePeerTS(struct rtllib_device *ieee, u8 *Addr)
> > > >
> > > >  	list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Admit_List, List) {
> > > >  		if (memcmp(pTS->Addr, Addr, 6) == 0) {
> > > > -			printk(KERN_INFO "====>remove Tx_TS_admin_list\n");
> > > > +			netdev_info(ieee->dev, "====>remove Tx_TS_admin_list\n");
> > > >  			RemoveTsEntry(ieee, pTS, TX_DIR);
> > > >  			list_del_init(&pTS->List);
> > > >  			list_add_tail(&pTS->List, &ieee->Tx_TS_Unused_List);
> > >
> > > Someone already sent this patch before you did :(
> >
> > Out of curiosity: All the other prints in this file uses RTLLIB_DEBUG. Could it be assumed
> > that they could be used here as well? Something like RTLLIB_DEBUG(RLTLIB_DL_TS,
> > ....)?
> 
> Your goal should be to get rid of RTLLIB_DEBUG, and replace them with
> standard kernel functions (dev_err, etc).
> 
> julia

Aha yes duly noted.


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

* Re: [Outreachy kernel] [PATCH] staging: rtl8192e: Replace printk with netdev_info
  2015-03-26  1:33   ` Marianne Moeller Knudsen
@ 2015-03-26 13:27     ` Julia Lawall
  2015-03-26  3:55       ` Marianne Moeller Knudsen
  2015-03-26 19:10       ` Jes Sorensen
  0 siblings, 2 replies; 6+ messages in thread
From: Julia Lawall @ 2015-03-26 13:27 UTC (permalink / raw)
  To: Marianne Moeller Knudsen; +Cc: Greg KH, outreachy-kernel



On Thu, 26 Mar 2015, Marianne Moeller Knudsen wrote:

> On Mon, Mar 23, 2015 at 10:43:02PM +0100, Greg KH wrote:
> > On Mon, Mar 23, 2015 at 07:04:24PM +0100, Marianne Moeller Knudsen wrote:
> > > Replace printk(KERN_INFO...) by netdev_info for more uniform error
> > > reporting. Issue found by checkpatch.
> > >
> > > Signed-off-by: Marianne Moeller Knudsen <marianne@masu.dk>
> > > ---
> > >  drivers/staging/rtl8192e/rtl819x_TSProc.c |    2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c b/drivers/staging/rtl8192e/rtl819x_TSProc.c
> > > index c51f7e0..949cba4 100644
> > > --- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
> > > +++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
> > > @@ -479,7 +479,7 @@ void RemovePeerTS(struct rtllib_device *ieee, u8 *Addr)
> > >
> > >  	list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Admit_List, List) {
> > >  		if (memcmp(pTS->Addr, Addr, 6) == 0) {
> > > -			printk(KERN_INFO "====>remove Tx_TS_admin_list\n");
> > > +			netdev_info(ieee->dev, "====>remove Tx_TS_admin_list\n");
> > >  			RemoveTsEntry(ieee, pTS, TX_DIR);
> > >  			list_del_init(&pTS->List);
> > >  			list_add_tail(&pTS->List, &ieee->Tx_TS_Unused_List);
> >
> > Someone already sent this patch before you did :(
>
> Out of curiosity: All the other prints in this file uses RTLLIB_DEBUG. Could it be assumed
> that they could be used here as well? Something like RTLLIB_DEBUG(RLTLIB_DL_TS,
> ....)?

Your goal should be to get rid of RTLLIB_DEBUG, and replace them with
standard kernel functions (dev_err, etc).

julia


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

* Re: [Outreachy kernel] [PATCH] staging: rtl8192e: Replace printk with netdev_info
  2015-03-26 13:27     ` Julia Lawall
  2015-03-26  3:55       ` Marianne Moeller Knudsen
@ 2015-03-26 19:10       ` Jes Sorensen
  1 sibling, 0 replies; 6+ messages in thread
From: Jes Sorensen @ 2015-03-26 19:10 UTC (permalink / raw)
  To: Julia Lawall, Marianne Moeller Knudsen; +Cc: Greg KH, outreachy-kernel

On 03/26/15 09:27, Julia Lawall wrote:
> 
> 
> On Thu, 26 Mar 2015, Marianne Moeller Knudsen wrote:
> 
>> On Mon, Mar 23, 2015 at 10:43:02PM +0100, Greg KH wrote:
>>> On Mon, Mar 23, 2015 at 07:04:24PM +0100, Marianne Moeller Knudsen wrote:
>>>> Replace printk(KERN_INFO...) by netdev_info for more uniform error
>>>> reporting. Issue found by checkpatch.
>>>>
>>>> Signed-off-by: Marianne Moeller Knudsen <marianne@masu.dk>
>>>> ---
>>>>  drivers/staging/rtl8192e/rtl819x_TSProc.c |    2 +-
>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c b/drivers/staging/rtl8192e/rtl819x_TSProc.c
>>>> index c51f7e0..949cba4 100644
>>>> --- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
>>>> +++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
>>>> @@ -479,7 +479,7 @@ void RemovePeerTS(struct rtllib_device *ieee, u8 *Addr)
>>>>
>>>>  	list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Admit_List, List) {
>>>>  		if (memcmp(pTS->Addr, Addr, 6) == 0) {
>>>> -			printk(KERN_INFO "====>remove Tx_TS_admin_list\n");
>>>> +			netdev_info(ieee->dev, "====>remove Tx_TS_admin_list\n");
>>>>  			RemoveTsEntry(ieee, pTS, TX_DIR);
>>>>  			list_del_init(&pTS->List);
>>>>  			list_add_tail(&pTS->List, &ieee->Tx_TS_Unused_List);
>>>
>>> Someone already sent this patch before you did :(
>>
>> Out of curiosity: All the other prints in this file uses RTLLIB_DEBUG. Could it be assumed
>> that they could be used here as well? Something like RTLLIB_DEBUG(RLTLIB_DL_TS,
>> ....)?
> 
> Your goal should be to get rid of RTLLIB_DEBUG, and replace them with
> standard kernel functions (dev_err, etc).

Note that RTLLIB_DEBUG is used to select the debug print levels based on
a module parameter. Switching them over to always using netdev_debug()
is not necessarily desirable.

To a large extent it will depend on what the maintainer/developer needs
them for. It might be possible to clean them up and make them prettier,
but just pulling them out and replacing them with netdev_foo() needs
consideration first.

Cheers,
Jes




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

end of thread, other threads:[~2015-03-26 19:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-23 18:04 [PATCH] staging: rtl8192e: Replace printk with netdev_info Marianne Moeller Knudsen
2015-03-23 21:43 ` [Outreachy kernel] " Greg KH
2015-03-26  1:33   ` Marianne Moeller Knudsen
2015-03-26 13:27     ` Julia Lawall
2015-03-26  3:55       ` Marianne Moeller Knudsen
2015-03-26 19:10       ` 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.