[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100422041338.GE24384@pengutronix.de>
Date: Thu, 22 Apr 2010 06:13:38 +0200
From: Wolfram Sang <w.sang@...gutronix.de>
To: Joe Perches <joe@...ches.com>
Cc: Gustavo Silva <silvagustavosilva@...il.com>, gregkh@...e.de,
abbotti@....co.uk, devel@...verdev.osuosl.org,
fmhess@...rs.sourceforge.net, linux-kernel@...r.kernel.org,
silvagustavo@...rs.sourceforge.net
Subject: Re: [PATCH] Staging: Comedi: Drivers: Fix coding style issues in
dt2801.c
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/ |
Download attachment "signature.asc" of type "application/pgp-signature" (198 bytes)
Powered by blists - more mailing lists