From: Joe Perches <joe@perches.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Jiri Kosina <jkosina@suse.cz>,
Dan Carpenter <dan.carpenter@oracle.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] pktcdvd: Convert printk to pr_<level>
Date: Fri, 31 May 2013 14:56:28 -0700 [thread overview]
Message-ID: <1370037388.10556.86.camel@joe-AO722> (raw)
In-Reply-To: <CAHp75Vdt22imDXu0phvbAVz=D-ctXH_JV6eMZ457e4d+=Tj0=Q@mail.gmail.com>
On Fri, 2013-05-31 at 22:44 +0300, Andy Shevchenko wrote:
> On Thu, May 30, 2013 at 11:57 PM, Joe Perches <joe@perches.com> wrote:
> > Use a more current logging style and add messages levels
> > to the logging messages.
> >
> > Convert bare printks to pr_cont where appropriate and
> > add a simple function to emit the sense string.
>
> Few comments below.
>
> Why not dev_dbg wherever it's possible?
Because dev_<level> conversions are not appropriate for a
first pass. The "struct pktcdvd *" needs to be available
for more function calls and that's more work / less
automatic and this pass is more easily verified.
> > - printk(DRIVER_NAME":");
> > + pr_err("");
> > for (i = 0; i < CDROM_PACKET_SIZE; i++)
> > - printk(" %02x", cgc->cmd[i]);
> > - printk(" - ");
> > + pr_cont(" %02x", cgc->cmd[i]);
>
> This one is actually %*ph.
>
> Like: pr_info("%*ph", CDROM_PACKET_SIZE, cgc->cmd);
>
> And what is the level of this message? debug?
pr_err and good point about %*ph, I've fixed it and
the stupid typo around the #include here.
next prev parent reply other threads:[~2013-05-31 21:56 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-16 8:11 [patch] pktcdvd: silence static checker warning Dan Carpenter
2013-05-29 13:37 ` Jiri Kosina
2013-05-30 20:57 ` [PATCH 0/3] pktcdvd: A few more neatenings Joe Perches
2013-05-30 20:57 ` [PATCH 1/3] pktcdvd: Convert ZONE macro to static function get_zone() Joe Perches
2013-05-30 20:57 ` [PATCH 2/3] pktcdvd: Convert printk to pr_<level> Joe Perches
2013-05-31 19:44 ` Andy Shevchenko
2013-05-31 21:56 ` Joe Perches [this message]
2013-05-30 20:57 ` [PATCH 3/3] pktcdvd: Consolidate DPRINTK and VPRINTK macros Joe Perches
2013-05-31 5:37 ` [PATCH 0/3] pktcdvd: A few more neatenings Joe Perches
2013-06-01 4:11 ` [PATCH V2 0/8] pktcdvd: More neatenings Joe Perches
2013-06-01 4:11 ` [PATCH V2 1/8] pktcdvd: Convert ZONE macro to static function get_zone() Joe Perches
2013-06-01 4:11 ` [PATCH V2 2/8] pktcdvd: Convert printk to pr_<level> Joe Perches
2013-06-03 9:57 ` Dan Carpenter
2013-06-03 10:42 ` Andy Shevchenko
2013-06-03 11:59 ` Joe Perches
2013-06-03 12:50 ` Dan Carpenter
2013-06-03 12:58 ` Joe Perches
2013-06-03 16:45 ` [PATCH V3 0/8] pktcdvd: More neatenings Joe Perches
2013-06-03 16:45 ` [PATCH V3 1/8] pktcdvd: Convert ZONE macro to static function get_zone() Joe Perches
2013-06-03 16:45 ` [PATCH V3 2/8] pktcdvd: Convert printk to pr_<level> Joe Perches
2013-06-03 16:45 ` [PATCH V3 3/8] pktcdvd: Consolidate DPRINTK and VPRINTK macros Joe Perches
2013-06-03 16:45 ` [PATCH V3 4/8] pktcdvd: Add struct pktcdvd_device * to pkt_dbg Joe Perches
2013-06-03 16:45 ` [PATCH V3 5/8] pktcdvd: Add struct pktcdvd_device.name to pr_err logging where possible Joe Perches
2013-06-03 16:45 ` [PATCH V3 6/8] pktcdvd: Convert pr_notice to pkt_notice Joe Perches
2013-06-03 16:45 ` [PATCH V3 7/8] pktcdvd: Convert pr_info to pkt_info Joe Perches
2013-06-03 16:45 ` [PATCH V3 8/8] pktcdvd: Add struct pktcdvd_device * to pkt_dump_sense() Joe Perches
2013-07-23 0:53 ` [PATCH V3 0/8] pktcdvd: More neatenings Joe Perches
2013-07-30 9:18 ` Jiri Kosina
2013-06-01 4:11 ` [PATCH V2 3/8] pktcdvd: Consolidate DPRINTK and VPRINTK macros Joe Perches
2013-06-01 4:11 ` [PATCH V2 4/8] pktcdvd: Add struct pktcdvd_device * to pkt_dbg Joe Perches
2013-06-01 4:11 ` [PATCH V2 5/8] pktcdvd: Add struct pktcdvd_device.name to pr_err logging where possible Joe Perches
2013-06-01 4:11 ` [PATCH V2 6/8] pktcdvd: Convert pr_notice to pkt_notice Joe Perches
2013-06-02 12:12 ` Andy Shevchenko
2013-06-02 12:22 ` Joe Perches
2013-06-01 4:11 ` [PATCH V2 7/8] pktcdvd: Convert pr_info to pkt_info Joe Perches
2013-06-01 4:11 ` [PATCH V2 8/8] pktcdvd: Add struct pktcdvd_device * to pkt_dump_sense() Joe Perches
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=1370037388.10556.86.camel@joe-AO722 \
--to=joe@perches.com \
--cc=andy.shevchenko@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=jkosina@suse.cz \
--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®