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

Replace printk without loglevel with pr_debug. Issue found by
checkpatch.

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

diff --git a/drivers/staging/sm750fb/ddk750_display.c b/drivers/staging/sm750fb/ddk750_display.c
index c84196a..9f768a3 100644
--- a/drivers/staging/sm750fb/ddk750_display.c
+++ b/drivers/staging/sm750fb/ddk750_display.c
@@ -51,7 +51,7 @@ static void setDisplayControl(int ctrl,int dispState)
 				POKE32(PANEL_DISPLAY_CTRL, ulDisplayCtrlReg);
 			} while((PEEK32(PANEL_DISPLAY_CTRL) & ~ulReservedBits) !=
 					(ulDisplayCtrlReg & ~ulReservedBits));
-			printk("Set Panel Plane enbit:after tried %d times\n",cnt);
+			pr_debug("Set Panel Plane enbit:after tried %d times\n",cnt);
 		}
 		else
 		{
-- 
1.7.10.4



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

* Re: [Outreachy kernel] [PATCH] staging: sm750fb: Replace printk with pr_debug
  2015-03-22 20:05 [PATCH] staging: sm750fb: Replace printk with pr_debug Marianne Moeller Knudsen
@ 2015-03-23 21:30 ` Greg KH
  2015-03-24  6:37   ` Julia Lawall
  0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2015-03-23 21:30 UTC (permalink / raw)
  To: Marianne Moeller Knudsen; +Cc: outreachy-kernel

On Sun, Mar 22, 2015 at 09:05:02PM +0100, Marianne Moeller Knudsen wrote:
> Replace printk without loglevel with pr_debug. Issue found by
> checkpatch.
> 
> Signed-off-by: Marianne Moeller Knudsen <marianne@masu.dk>
> ---
>  drivers/staging/sm750fb/ddk750_display.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/sm750fb/ddk750_display.c b/drivers/staging/sm750fb/ddk750_display.c
> index c84196a..9f768a3 100644
> --- a/drivers/staging/sm750fb/ddk750_display.c
> +++ b/drivers/staging/sm750fb/ddk750_display.c
> @@ -51,7 +51,7 @@ static void setDisplayControl(int ctrl,int dispState)
>  				POKE32(PANEL_DISPLAY_CTRL, ulDisplayCtrlReg);
>  			} while((PEEK32(PANEL_DISPLAY_CTRL) & ~ulReservedBits) !=
>  					(ulDisplayCtrlReg & ~ulReservedBits));
> -			printk("Set Panel Plane enbit:after tried %d times\n",cnt);
> +			pr_debug("Set Panel Plane enbit:after tried %d times\n",cnt);

It's a driver, it should use dev_debug() instead please.

thanks,

greg k-h


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

* Re: [Outreachy kernel] [PATCH] staging: sm750fb: Replace printk with pr_debug
  2015-03-23 21:30 ` [Outreachy kernel] " Greg KH
@ 2015-03-24  6:37   ` Julia Lawall
  2015-03-24  9:45     ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: Julia Lawall @ 2015-03-24  6:37 UTC (permalink / raw)
  To: Greg KH; +Cc: Marianne Moeller Knudsen, outreachy-kernel



On Mon, 23 Mar 2015, Greg KH wrote:

> On Sun, Mar 22, 2015 at 09:05:02PM +0100, Marianne Moeller Knudsen wrote:
> > Replace printk without loglevel with pr_debug. Issue found by
> > checkpatch.
> > 
> > Signed-off-by: Marianne Moeller Knudsen <marianne@masu.dk>
> > ---
> >  drivers/staging/sm750fb/ddk750_display.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/staging/sm750fb/ddk750_display.c b/drivers/staging/sm750fb/ddk750_display.c
> > index c84196a..9f768a3 100644
> > --- a/drivers/staging/sm750fb/ddk750_display.c
> > +++ b/drivers/staging/sm750fb/ddk750_display.c
> > @@ -51,7 +51,7 @@ static void setDisplayControl(int ctrl,int dispState)
> >  				POKE32(PANEL_DISPLAY_CTRL, ulDisplayCtrlReg);
> >  			} while((PEEK32(PANEL_DISPLAY_CTRL) & ~ulReservedBits) !=
> >  					(ulDisplayCtrlReg & ~ulReservedBits));
> > -			printk("Set Panel Plane enbit:after tried %d times\n",cnt);
> > +			pr_debug("Set Panel Plane enbit:after tried %d times\n",cnt);
> 
> It's a driver, it should use dev_debug() instead please.

The @@ line shows that the function only has integer arguments.  Is it 
acceptable to add arguments just for debug messages?

julia

> 
> thanks,
> 
> greg k-h
> 
> -- 
> 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/20150323213038.GA26335%40kroah.com.
> For more options, visit https://groups.google.com/d/optout.
> 


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

* Re: [Outreachy kernel] [PATCH] staging: sm750fb: Replace printk with pr_debug
  2015-03-24  6:37   ` Julia Lawall
@ 2015-03-24  9:45     ` Greg KH
  2015-03-29 19:40       ` Marianne Moeller Knudsen
  0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2015-03-24  9:45 UTC (permalink / raw)
  To: Julia Lawall; +Cc: Marianne Moeller Knudsen, outreachy-kernel

On Tue, Mar 24, 2015 at 07:37:31AM +0100, Julia Lawall wrote:
> 
> 
> On Mon, 23 Mar 2015, Greg KH wrote:
> 
> > On Sun, Mar 22, 2015 at 09:05:02PM +0100, Marianne Moeller Knudsen wrote:
> > > Replace printk without loglevel with pr_debug. Issue found by
> > > checkpatch.
> > > 
> > > Signed-off-by: Marianne Moeller Knudsen <marianne@masu.dk>
> > > ---
> > >  drivers/staging/sm750fb/ddk750_display.c |    2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/staging/sm750fb/ddk750_display.c b/drivers/staging/sm750fb/ddk750_display.c
> > > index c84196a..9f768a3 100644
> > > --- a/drivers/staging/sm750fb/ddk750_display.c
> > > +++ b/drivers/staging/sm750fb/ddk750_display.c
> > > @@ -51,7 +51,7 @@ static void setDisplayControl(int ctrl,int dispState)
> > >  				POKE32(PANEL_DISPLAY_CTRL, ulDisplayCtrlReg);
> > >  			} while((PEEK32(PANEL_DISPLAY_CTRL) & ~ulReservedBits) !=
> > >  					(ulDisplayCtrlReg & ~ulReservedBits));
> > > -			printk("Set Panel Plane enbit:after tried %d times\n",cnt);
> > > +			pr_debug("Set Panel Plane enbit:after tried %d times\n",cnt);
> > 
> > It's a driver, it should use dev_debug() instead please.
> 
> The @@ line shows that the function only has integer arguments.  Is it 
> acceptable to add arguments just for debug messages?

Yes, it's talking to hardware, so we need to know the exact device that
caused the message.  Random messages like this don't help anyone out as
it doesn't describe the device, the file, the driver, or much of
anything else :(

thanks,

greg k-h


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

* Re: [Outreachy kernel] [PATCH] staging: sm750fb: Replace printk with pr_debug
  2015-03-24  9:45     ` Greg KH
@ 2015-03-29 19:40       ` Marianne Moeller Knudsen
  2015-03-29 19:44         ` Julia Lawall
  0 siblings, 1 reply; 6+ messages in thread
From: Marianne Moeller Knudsen @ 2015-03-29 19:40 UTC (permalink / raw)
  To: Greg KH; +Cc: Julia Lawall, outreachy-kernel

On Tue, Mar 24, 2015 at 10:45:14AM +0100, Greg KH wrote:
> On Tue, Mar 24, 2015 at 07:37:31AM +0100, Julia Lawall wrote:
> > 
> > 
> > On Mon, 23 Mar 2015, Greg KH wrote:
> > 
> > > On Sun, Mar 22, 2015 at 09:05:02PM +0100, Marianne Moeller Knudsen wrote:
> > > > Replace printk without loglevel with pr_debug. Issue found by
> > > > checkpatch.
> > > > 
> > > > Signed-off-by: Marianne Moeller Knudsen <marianne@masu.dk>
> > > > ---
> > > >  drivers/staging/sm750fb/ddk750_display.c |    2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > diff --git a/drivers/staging/sm750fb/ddk750_display.c b/drivers/staging/sm750fb/ddk750_display.c
> > > > index c84196a..9f768a3 100644
> > > > --- a/drivers/staging/sm750fb/ddk750_display.c
> > > > +++ b/drivers/staging/sm750fb/ddk750_display.c
> > > > @@ -51,7 +51,7 @@ static void setDisplayControl(int ctrl,int dispState)
> > > >  				POKE32(PANEL_DISPLAY_CTRL, ulDisplayCtrlReg);
> > > >  			} while((PEEK32(PANEL_DISPLAY_CTRL) & ~ulReservedBits) !=
> > > >  					(ulDisplayCtrlReg & ~ulReservedBits));
> > > > -			printk("Set Panel Plane enbit:after tried %d times\n",cnt);
> > > > +			pr_debug("Set Panel Plane enbit:after tried %d times\n",cnt);
> > > 
> > > It's a driver, it should use dev_debug() instead please.
> > 
> > The @@ line shows that the function only has integer arguments.  Is it 
> > acceptable to add arguments just for debug messages?
> 
> Yes, it's talking to hardware, so we need to know the exact device that
> caused the message.  Random messages like this don't help anyone out as
> it doesn't describe the device, the file, the driver, or much of
> anything else :(
> 
> thanks,
> 
> greg k-h

I've tried to make some code changes in order to use dev_dbg instead by passing fb_info. Maybe I could get some comments/hints/omgwhathaveyoudone on it? and if so how should I post it?

Thank you.


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

* Re: [Outreachy kernel] [PATCH] staging: sm750fb: Replace printk with pr_debug
  2015-03-29 19:40       ` Marianne Moeller Knudsen
@ 2015-03-29 19:44         ` Julia Lawall
  0 siblings, 0 replies; 6+ messages in thread
From: Julia Lawall @ 2015-03-29 19:44 UTC (permalink / raw)
  To: Marianne Moeller Knudsen; +Cc: Greg KH, Julia Lawall, outreachy-kernel



On Sun, 29 Mar 2015, Marianne Moeller Knudsen wrote:

> On Tue, Mar 24, 2015 at 10:45:14AM +0100, Greg KH wrote:
> > On Tue, Mar 24, 2015 at 07:37:31AM +0100, Julia Lawall wrote:
> > > 
> > > 
> > > On Mon, 23 Mar 2015, Greg KH wrote:
> > > 
> > > > On Sun, Mar 22, 2015 at 09:05:02PM +0100, Marianne Moeller Knudsen wrote:
> > > > > Replace printk without loglevel with pr_debug. Issue found by
> > > > > checkpatch.
> > > > > 
> > > > > Signed-off-by: Marianne Moeller Knudsen <marianne@masu.dk>
> > > > > ---
> > > > >  drivers/staging/sm750fb/ddk750_display.c |    2 +-
> > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > 
> > > > > diff --git a/drivers/staging/sm750fb/ddk750_display.c b/drivers/staging/sm750fb/ddk750_display.c
> > > > > index c84196a..9f768a3 100644
> > > > > --- a/drivers/staging/sm750fb/ddk750_display.c
> > > > > +++ b/drivers/staging/sm750fb/ddk750_display.c
> > > > > @@ -51,7 +51,7 @@ static void setDisplayControl(int ctrl,int dispState)
> > > > >  				POKE32(PANEL_DISPLAY_CTRL, ulDisplayCtrlReg);
> > > > >  			} while((PEEK32(PANEL_DISPLAY_CTRL) & ~ulReservedBits) !=
> > > > >  					(ulDisplayCtrlReg & ~ulReservedBits));
> > > > > -			printk("Set Panel Plane enbit:after tried %d times\n",cnt);
> > > > > +			pr_debug("Set Panel Plane enbit:after tried %d times\n",cnt);
> > > > 
> > > > It's a driver, it should use dev_debug() instead please.
> > > 
> > > The @@ line shows that the function only has integer arguments.  Is it 
> > > acceptable to add arguments just for debug messages?
> > 
> > Yes, it's talking to hardware, so we need to know the exact device that
> > caused the message.  Random messages like this don't help anyone out as
> > it doesn't describe the device, the file, the driver, or much of
> > anything else :(
> > 
> > thanks,
> > 
> > greg k-h
> 
> I've tried to make some code changes in order to use dev_dbg instead by passing fb_info. Maybe I could get some comments/hints/omgwhathaveyoudone on it? and if so how should I post it?

Just post what you propose.  If you have some doubts about what you have 
done, you can discuss them under the ---.  That way ifthe strategy you 
have taken is actually fine, the patch can be accepted as is, and your 
comments will disappear.

julia


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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-22 20:05 [PATCH] staging: sm750fb: Replace printk with pr_debug Marianne Moeller Knudsen
2015-03-23 21:30 ` [Outreachy kernel] " Greg KH
2015-03-24  6:37   ` Julia Lawall
2015-03-24  9:45     ` Greg KH
2015-03-29 19:40       ` Marianne Moeller Knudsen
2015-03-29 19:44         ` Julia Lawall

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.