From: Joe Perches <joe@perches.com>
To: Arpith Easow Alexander <arpith99@gmail.com>
Cc: abbotti@mev.co.uk, fmhess@users.sourceforge.net,
gregkh@linuxfoundation.org, hsweeten@visionengravers.com,
dan.carpenter@oracle.com, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] Staging: comedi: drivers: replaced printk with dev_dbg
Date: Mon, 19 Nov 2012 07:20:30 -0800 [thread overview]
Message-ID: <1353338430.5287.6.camel@joe-AO722> (raw)
In-Reply-To: <20121119151419.GA4807@gmail.com>
On Mon, 2012-11-19 at 20:44 +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.
The commit message is missing description of why
some printk(KERN_INFO are converted to dev_dbg
Also, it'd be better to remove the dbgcm macro
altogether and just use dev_dbg.
> diff --git 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); \
> } while (0)
The dbgcm variable and macro isn't really necessary
because dynamic_debug has all the same capability.
> @@ -1371,14 +1373,16 @@ static int vmk80xx_usb_probe(struct usb_interface *intf,
>
> if (dev->board.model == VMK8061_MODEL) {
> vmk80xx_read_eeprom(dev, IC3_VERSION);
> - printk(KERN_INFO "comedi#: vmk80xx: %s\n", dev->fw.ic3_vers);
> + dev_dbg(&(dev->udev->dev),
> + "comedi#: vmk80xx: %s\n", dev->fw.ic3_vers);
This likely should not be dev_dbg.
prev parent reply other threads:[~2012-11-19 15:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-19 15:14 Arpith Easow Alexander
2012-11-19 15:20 ` Joe Perches [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=1353338430.5287.6.camel@joe-AO722 \
--to=joe@perches.com \
--cc=abbotti@mev.co.uk \
--cc=arpith99@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=fmhess@users.sourceforge.net \
--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®