Messages in this thread | | | Subject | Re: [PATCH 2/3] pktcdvd: Convert printk to pr_<level> | From | Joe Perches <> | Date | Fri, 31 May 2013 14:56:28 -0700 |
| |
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.
| |