[PATCH] Staging: comedi: drivers: replaced printk with dev_dbg

Arpith Easow Alexander arpith99 at gmail.com
Thu Nov 15 16:27:42 UTC 2012


On Tue, Nov 13, 2012 at 11:52:52AM -0800, Greg KH wrote:
> On Sat, Nov 10, 2012 at 12:38:38PM +0530, Arpith Easow Alexander wrote:
> > This is a patch to the vmk80xx.c file that replaces the printk with dev_dbg.
> > This fixes the warnings found by the checkpatch.pl tool.
> > 
> > Signed-off-by: Arpith Easow Alexander <arpith99 at gmail.com>
> > ---
> >  drivers/staging/comedi/drivers/vmk80xx.c |   30 ++++++++++++++++++------------
> >  1 file changed, 18 insertions(+), 12 deletions(-)
> > 
> > diff --git a/drivers/staging/comedi/drivers/vmk80xx.c b/drivers/staging/comedi/drivers/vmk80xx.c
> > index df277aa..6eb5361 100644
> > --- a/drivers/staging/comedi/drivers/vmk80xx.c
> > +++ b/drivers/staging/comedi/drivers/vmk80xx.c
> > @@ -131,10 +131,10 @@ static int dbgcm = 1;
> >  static int dbgcm;
> >  #endif
> >  
> > -#define dbgcm(fmt, arg...)                     \
> > +#define dbgcm(dev, fmt, arg...)                     \
> >  do {                                           \
> >  	if (dbgcm)                             \
> > -		printk(KERN_DEBUG fmt, ##arg); \
> > +		dev_dbg(dev, fmt, ##arg); \
> 
> So a macro called dbgcm tests a variable called dbgcm?  Gotta love c at
> times...
> 
> Just delete the macro, and the variable, and call dev_dbg() directly
> please.

Ok. Done. (Attached both changes).

Thanks,
Arpith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Staging-comedi-drivers-replaced-printk-with-dev_dbg.patch
Type: text/x-diff
Size: 3346 bytes
Desc: not available
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20121115/524e65d6/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Staging-comedi-drivers-Replaced-macro-dbgcm-with-dir.patch
Type: text/x-diff
Size: 2084 bytes
Desc: not available
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20121115/524e65d6/attachment-0001.bin>


More information about the devel mailing list