mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wolfram Sang <w.sang@pengutronix.de>
To: Joe Perches <joe@perches.com>
Cc: Gustavo Silva <silvagustavosilva@gmail.com>,
	gregkh@suse.de, abbotti@mev.co.uk, devel@driverdev.osuosl.org,
	fmhess@users.sourceforge.net, linux-kernel@vger.kernel.org,
	silvagustavo@users.sourceforge.net
Subject: Re: [PATCH] Staging: Comedi: Drivers: Fix coding style issues in dt2801.c
Date: Thu, 22 Apr 2010 06:13:38 +0200	[thread overview]
Message-ID: <20100422041338.GE24384@pengutronix.de> (raw)
In-Reply-To: <1271908811.1730.613.camel@Joe-Laptop.home>

[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]

On Wed, Apr 21, 2010 at 09:00:11PM -0700, Joe Perches wrote:

> > @@ -374,8 +362,8 @@ static int dt2801_writecmd(struct comedi_device *dev, int command)
> >  
> >  	stat = inb_p(dev->iobase + DT2801_STATUS);
> >  	if (stat & DT_S_COMPOSITE_ERROR) {
> > -		printk
> > -		    ("dt2801: composite-error in dt2801_writecmd(), ignoring\n");
> > +		printk(KERN_INFO "dt2801: composite-error in dt2801_writecmd()"
> > +								", ignoring\n");
> 
> It's good to preface with KERN_, but better might be to use
> 	#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> and strip the "dt2801: " intro and use
> 	pr_<level>("%s(): composite-error, ignoring\n", __func__)
> 
> It's a bit shorter, always gets the appropriate prefix, and
> would emit the proper function name if ever refactored.

What about dev_* in case there are more than one of those devices?
Also, KERN_INFO doesn't look right, KERN_WARN?

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2010-04-22  4:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-22  3:46 Gustavo Silva
2010-04-22  4:00 ` Joe Perches
2010-04-22  4:13   ` Wolfram Sang [this message]
2010-04-22  4:36     ` Joe Perches
2010-04-22  6:31       ` Wolfram Sang
2010-04-22  4:23   ` Gustavo Silva

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=20100422041338.GE24384@pengutronix.de \
    --to=w.sang@pengutronix.de \
    --cc=abbotti@mev.co.uk \
    --cc=devel@driverdev.osuosl.org \
    --cc=fmhess@users.sourceforge.net \
    --cc=gregkh@suse.de \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=silvagustavo@users.sourceforge.net \
    --cc=silvagustavosilva@gmail.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 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®