mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeremiah Mahler <jmmahler@gmail.com>
To: Chase Southwood <chase.southwood@gmail.com>
Cc: gregkh@linuxfoundation.org, abbotti@mev.co.uk,
	hsweeten@visionengravers.com, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: comedi: change some printk calls to pr_err
Date: Mon, 1 Dec 2014 00:47:35 -0800	[thread overview]
Message-ID: <20141201084735.GA2705@hudson.localdomain> (raw)
In-Reply-To: <1417410356-25504-1-git-send-email-chase.southwood@gmail.com>

Chase,

On Sun, Nov 30, 2014 at 11:05:56PM -0600, Chase Southwood wrote:
> There are a handful of calls to printk in ni_stc.h without specified log
> levels, as well as one in ni_mio_common.c.  This patch converts these
> calls to pr_err() instead, so that they are now explicitly log level
> ERR.
> 
> Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
> ---
> I tacked the change to ni_mio_common.c on to this patch since it's the same
> exact change and it's just one line, so I think a single patch is justified
> here.
>  drivers/staging/comedi/drivers/ni_mio_common.c |  2 +-
>  drivers/staging/comedi/drivers/ni_stc.h        | 14 +++++++-------
>  2 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c
> index 353c17b..11e7017 100644
> --- a/drivers/staging/comedi/drivers/ni_mio_common.c
> +++ b/drivers/staging/comedi/drivers/ni_mio_common.c
> @@ -3945,7 +3945,7 @@ static unsigned ni_gpct_to_stc_register(enum ni_gpct_register reg)
>  		stc_register = Interrupt_B_Enable_Register;
>  		break;
>  	default:
> -		printk("%s: unhandled register 0x%x in switch.\n",
> +		pr_err("%s: unhandled register 0x%x in switch.\n",
>  		       __func__, reg);
>  		BUG();
>  		return 0;
[...]

On my system the default log level is 4 which corresponds to
KERN_WARNING.  So switching to pr_err() would change the log level
of these messages.  Using pr_warn() might be a better choice.

-- 
- Jeremiah Mahler

  reply	other threads:[~2014-12-01  8:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-01  5:05 Chase Southwood
2014-12-01  8:47 ` Jeremiah Mahler [this message]
2014-12-01  9:57   ` Ian Abbott
2014-12-01 10:09 ` Ian Abbott

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=20141201084735.GA2705@hudson.localdomain \
    --to=jmmahler@gmail.com \
    --cc=abbotti@mev.co.uk \
    --cc=chase.southwood@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hsweeten@visionengravers.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®