All of lore.kernel.org
 help / color / mirror / Atom feed
From: Elise Lennion <elise.lennion@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: sudipm.mukherjee@gmail.com, teddy.wang@siliconmotion.com,
	outreachy-kernel@googlegroups.com
Subject: Re: [PATCH v3] staging: sm750fb: Replace printk() with pr_info().
Date: Sat, 8 Oct 2016 23:08:54 -0300	[thread overview]
Message-ID: <20161009020854.GA30508@lennorien.com> (raw)
In-Reply-To: <20161006124826.GA14551@kroah.com>

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


  reply	other threads:[~2016-10-09  2:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2016-10-09  5:48     ` [Outreachy kernel] " Julia Lawall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161009020854.GA30508@lennorien.com \
    --to=elise.lennion@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=outreachy-kernel@googlegroups.com \
    --cc=sudipm.mukherjee@gmail.com \
    --cc=teddy.wang@siliconmotion.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.