All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Cristina Opriceana <cristina.opriceana@gmail.com>
Cc: outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH] Staging: dgnc: Replace printk() with dev_info()
Date: Fri, 27 Feb 2015 06:59:26 -0800	[thread overview]
Message-ID: <20150227145926.GA19745@kroah.com> (raw)
In-Reply-To: <20150227145322.GA19004@Inspiron>

On Fri, Feb 27, 2015 at 04:53:22PM +0200, Cristina Opriceana wrote:
> This patch replaces printk() with dev_info() in order to avoid the
> suggestion of using a more specific function.
> Warning found by checkpatch.pl
> 
> Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
> ---
>  drivers/staging/dgnc/dgnc_driver.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c
> index ace2af6..cd349cd 100644
> --- a/drivers/staging/dgnc/dgnc_driver.c
> +++ b/drivers/staging/dgnc/dgnc_driver.c
> @@ -364,7 +364,7 @@ static void dgnc_cleanup_board(struct dgnc_board *brd)
>  
>  		spin_lock_irqsave(&dgnc_global_lock, flags);
>  		brd->msgbuf = NULL;
> -		printk("%s", brd->msgbuf_head);
> +		dev_info(&brd->pdev->dev, "dgnc : %s\n", brd->msgbuf_head);

If you use dev_info, there is no need for the "dgnc : " portion of the
string, it will show up automatically.

And this really looks like debugging information, why not use dev_dbg()
instead?

thanks,

greg k-h


      reply	other threads:[~2015-02-27 14:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-27 14:53 [PATCH] Staging: dgnc: Replace printk() with dev_info() Cristina Opriceana
2015-02-27 14:59 ` Greg KH [this message]

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=20150227145926.GA19745@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=cristina.opriceana@gmail.com \
    --cc=outreachy-kernel@googlegroups.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.