lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 31 May 2013 14:56:28 -0700
From:	Joe Perches <joe@...ches.com>
To:	Andy Shevchenko <andy.shevchenko@...il.com>
Cc:	Jiri Kosina <jkosina@...e.cz>,
	Dan Carpenter <dan.carpenter@...cle.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/3] pktcdvd: Convert printk to pr_<level>

On Fri, 2013-05-31 at 22:44 +0300, Andy Shevchenko wrote:
> On Thu, May 30, 2013 at 11:57 PM, Joe Perches <joe@...ches.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.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ