* [PATCH v3] staging: sm750fb: Replace printk() with pr_info().
@ 2016-10-05 20:52 Elise Lennion
2016-10-06 12:48 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Elise Lennion @ 2016-10-05 20:52 UTC (permalink / raw)
To: sudipm.mukherjee, teddy.wang, gregkh, outreachy-kernel
Fix checkpatch warning:
WARNING: printk() should include KERN_ facility level
New checkpatch warning appears after including KERN_ facility level.
Fix checkpatch warning:
WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
---
v2: Fixed new checkpatch warning noted by Julia Lawall <julia.lawall@lip6.fr>
Reworked to use pr_info() instead of printk()
drivers/staging/sm750fb/ddk750_help.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/sm750fb/ddk750_help.c b/drivers/staging/sm750fb/ddk750_help.c
index 9637dd3..475a943 100644
--- a/drivers/staging/sm750fb/ddk750_help.c
+++ b/drivers/staging/sm750fb/ddk750_help.c
@@ -11,7 +11,5 @@ void ddk750_set_mmio(void __iomem *addr, unsigned short devId, char revId)
devId750 = devId;
revId750 = revId;
if (revId == 0xfe)
- printk("found sm750le\n");
+ pr_info("found sm750le\n");
}
-
-
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3] staging: sm750fb: Replace printk() with pr_info().
2016-10-05 20:52 [PATCH v3] staging: sm750fb: Replace printk() with pr_info() Elise Lennion
@ 2016-10-06 12:48 ` Greg KH
2016-10-09 2:08 ` Elise Lennion
0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2016-10-06 12:48 UTC (permalink / raw)
To: Elise Lennion; +Cc: sudipm.mukherjee, teddy.wang, outreachy-kernel
On Wed, Oct 05, 2016 at 05:52:47PM -0300, Elise Lennion wrote:
> Fix checkpatch warning:
>
> WARNING: printk() should include KERN_ facility level
>
> New checkpatch warning appears after including KERN_ facility level.
>
> Fix checkpatch warning:
>
> WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...
>
> Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
> ---
>
> v2: Fixed new checkpatch warning noted by Julia Lawall <julia.lawall@lip6.fr>
> Reworked to use pr_info() instead of printk()
>
> drivers/staging/sm750fb/ddk750_help.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/staging/sm750fb/ddk750_help.c b/drivers/staging/sm750fb/ddk750_help.c
> index 9637dd3..475a943 100644
> --- a/drivers/staging/sm750fb/ddk750_help.c
> +++ b/drivers/staging/sm750fb/ddk750_help.c
> @@ -11,7 +11,5 @@ void ddk750_set_mmio(void __iomem *addr, unsigned short devId, char revId)
> devId750 = devId;
> revId750 = revId;
> if (revId == 0xfe)
> - printk("found sm750le\n");
> + pr_info("found sm750le\n");
> }
> -
> -
Why are you deleting these extra lines?
And why can't you use dev_info() here instead of pr_info()?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3] staging: sm750fb: Replace printk() with pr_info().
2016-10-06 12:48 ` Greg KH
@ 2016-10-09 2:08 ` Elise Lennion
2016-10-09 5:48 ` [Outreachy kernel] " Julia Lawall
0 siblings, 1 reply; 4+ messages in thread
From: Elise Lennion @ 2016-10-09 2:08 UTC (permalink / raw)
To: Greg KH; +Cc: sudipm.mukherjee, teddy.wang, outreachy-kernel
On Thu, Oct 06, 2016 at 02:48:26PM +0200, Greg KH wrote:
> On Wed, Oct 05, 2016 at 05:52:47PM -0300, Elise Lennion wrote:
> > Fix checkpatch warning:
> >
> > WARNING: printk() should include KERN_ facility level
> >
> > New checkpatch warning appears after including KERN_ facility level.
> >
> > Fix checkpatch warning:
> >
> > WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...
> >
> > Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
> > ---
> >
> > v2: Fixed new checkpatch warning noted by Julia Lawall <julia.lawall@lip6.fr>
> > Reworked to use pr_info() instead of printk()
> >
> > drivers/staging/sm750fb/ddk750_help.c | 4 +---
> > 1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/drivers/staging/sm750fb/ddk750_help.c b/drivers/staging/sm750fb/ddk750_help.c
> > index 9637dd3..475a943 100644
> > --- a/drivers/staging/sm750fb/ddk750_help.c
> > +++ b/drivers/staging/sm750fb/ddk750_help.c
> > @@ -11,7 +11,5 @@ void ddk750_set_mmio(void __iomem *addr, unsigned short devId, char revId)
> > devId750 = devId;
> > revId750 = revId;
> > if (revId == 0xfe)
> > - printk("found sm750le\n");
> > + pr_info("found sm750le\n");
> > }
> > -
> > -
>
> Why are you deleting these extra lines?
>
I was fixing a checkpatch CHECK and forgot to put it in a different commit, sorry.
> And why can't you use dev_info() here instead of pr_info()?
>
> thanks,
>
> greg k-h
I didn't use dev_info() because I didn't find a reference to a device struct.
I searched about how to use dev_* and all examples I found passed a pointer to a device struct in the function call.
In this case, without the pointer, how can I find the device to pass to dev_info()?
thank you.
elise
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Outreachy kernel] Re: [PATCH v3] staging: sm750fb: Replace printk() with pr_info().
2016-10-09 2:08 ` Elise Lennion
@ 2016-10-09 5:48 ` Julia Lawall
0 siblings, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2016-10-09 5:48 UTC (permalink / raw)
To: Elise Lennion; +Cc: Greg KH, sudipm.mukherjee, teddy.wang, outreachy-kernel
On Sat, 8 Oct 2016, Elise Lennion wrote:
> On Thu, Oct 06, 2016 at 02:48:26PM +0200, Greg KH wrote:
> > On Wed, Oct 05, 2016 at 05:52:47PM -0300, Elise Lennion wrote:
> > > Fix checkpatch warning:
> > >
> > > WARNING: printk() should include KERN_ facility level
> > >
> > > New checkpatch warning appears after including KERN_ facility level.
> > >
> > > Fix checkpatch warning:
> > >
> > > WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...
> > >
> > > Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
> > > ---
> > >
> > > v2: Fixed new checkpatch warning noted by Julia Lawall <julia.lawall@lip6.fr>
> > > Reworked to use pr_info() instead of printk()
> > >
> > > drivers/staging/sm750fb/ddk750_help.c | 4 +---
> > > 1 file changed, 1 insertion(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/staging/sm750fb/ddk750_help.c b/drivers/staging/sm750fb/ddk750_help.c
> > > index 9637dd3..475a943 100644
> > > --- a/drivers/staging/sm750fb/ddk750_help.c
> > > +++ b/drivers/staging/sm750fb/ddk750_help.c
> > > @@ -11,7 +11,5 @@ void ddk750_set_mmio(void __iomem *addr, unsigned short devId, char revId)
> > > devId750 = devId;
> > > revId750 = revId;
> > > if (revId == 0xfe)
> > > - printk("found sm750le\n");
> > > + pr_info("found sm750le\n");
> > > }
> > > -
> > > -
> >
> > Why are you deleting these extra lines?
> >
>
> I was fixing a checkpatch CHECK and forgot to put it in a different commit, sorry.
>
> > And why can't you use dev_info() here instead of pr_info()?
> >
> > thanks,
> >
> > greg k-h
>
> I didn't use dev_info() because I didn't find a reference to a device struct.
>
> I searched about how to use dev_* and all examples I found passed a pointer to a device struct in the function call.
>
> In this case, without the pointer, how can I find the device to pass to dev_info()?
Maybe the information is available in a function that calls this one, and
you can add an extra parameter?
julia
>
> thank you.
>
> elise
>
> --
> 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/20161009020854.GA30508%40lennorien.com.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-10-09 5:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-05 20:52 [PATCH v3] staging: sm750fb: Replace printk() with pr_info() Elise Lennion
2016-10-06 12:48 ` Greg KH
2016-10-09 2:08 ` Elise Lennion
2016-10-09 5:48 ` [Outreachy kernel] " 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.