From: Joe Perches <joe@perches.com>
To: Bart Van Assche <Bart.VanAssche@wdc.com>,
"jthumshirn@suse.de" <jthumshirn@suse.de>,
"axboe@fb.com" <axboe@fb.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: [PATCH TRIVIAL] bsg: use pr_debug instead of hand crafted macros
Date: Mon, 22 Jan 2018 13:04:19 -0800 [thread overview]
Message-ID: <1516655059.8378.21.camel@perches.com> (raw)
In-Reply-To: <1516653723.2545.37.camel@wdc.com>
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
prev parent reply other threads:[~2018-01-22 21:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-22 7:53 [PATCH TRIVIAL] bsg: use pr_debug instead of hand crafted macros Johannes Thumshirn
2018-01-22 16:33 ` Bart Van Assche
2018-01-22 20:23 ` Joe Perches
2018-01-22 20:42 ` Bart Van Assche
2018-01-22 20:42 ` Bart Van Assche
2018-01-22 21:04 ` Joe Perches [this message]
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=1516655059.8378.21.camel@perches.com \
--to=joe@perches.com \
--cc=Bart.VanAssche@wdc.com \
--cc=axboe@fb.com \
--cc=jthumshirn@suse.de \
--cc=linux-block@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.