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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1516655059.8378.21.camel@perches.com>
Date:   Mon, 22 Jan 2018 13:04:19 -0800
From:   Joe Perches <joe@...ches.com>
To:     Bart Van Assche <Bart.VanAssche@....com>,
        "jthumshirn@...e.de" <jthumshirn@...e.de>,
        "axboe@...com" <axboe@...com>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-block@...r.kernel.org" <linux-block@...r.kernel.org>
Subject: Re: [PATCH TRIVIAL] bsg: use pr_debug instead of hand crafted macros

On Mon, 2018-01-22 at 20:42 +0000, Bart Van Assche wrote:
> On Mon, 2018-01-22 at 12:23 -0800, Joe Perches wrote:
> > On Mon, 2018-01-22 at 08:53 +0100, Johannes Thumshirn wrote:
> > > Use pr_debug instead of hand crafted macros. This way it is not needed to
> > > re-compile the kernel to enable bsg debug outputs and it's possible to
> > > selectively enable specific prints.
> > 
> > Perhaps better to use
> > 
> > #define bsg_dbg(bd, fmt, ...) \
> > 	pr_debug(bd->name, fmt, ##__VA_ARGS__)

That was written with my brain switched off
and was obviously incorrect.

> Hello Joe,

Hi Bart.

> Why do you think that would be better?

All of the messages save one already emit bd->name
(and that one that doesn't use bd->name could likely
use it too)

So maybe this is better:

#define bsg_dbg(bd, fmt, ...) \
	pr_debug("%s: " fmt, (bd)->name, ##__VA_ARGS__)

cheers, Joe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ