lkml.org 
[lkml]   [2013]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/3] pktcdvd: Convert printk to pr_<level>
From
Date
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.



\
 
 \ /
  Last update: 2013-06-01 00:21    [W:0.049 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site