From: Joe Perches <joe@perches.com>
To: Bing Zhao <bzhao@marvell.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"John W. Linville" <linville@tuxdriver.com>,
Johannes Berg <johannes@sipsolutions.net>,
Amitkumar Karwar <akarwar@marvell.com>,
Kiran Divekar <dkiran@marvell.com>,
Yogesh Powar <yogeshp@marvell.com>,
Marc Yang <yangyang@marvell.com>,
Frank Huang <frankh@marvell.com>
Subject: RE: [PATCH v2] mwifiex: remove PRINTM/HEXDUMP and associated
Date: Thu, 03 Mar 2011 14:40:12 -0800 [thread overview]
Message-ID: <1299192012.4338.170.camel@Joe-Laptop> (raw)
In-Reply-To: <477F20668A386D41ADCC57781B1F704307F5150CCD@SC-VEXCH1.marvell.com>
On Thu, 2011-03-03 at 14:04 -0800, Bing Zhao wrote:
> Hi Joe,
>
> > Please use pr_fmt
> > #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> > to prefix "mwifiex: " rather than put it each
> > format string.
>
> For pr_debug, the original "fmt" is used to construct the _ddebug descriptor:
>
> #define dynamic_pr_debug(fmt, ...) do { \
> static struct _ddebug descriptor \
> __used \
> __attribute__((section("__verbose"), aligned(8))) = \
> { KBUILD_MODNAME, __func__, __FILE__, fmt, __LINE__, \
> _DPRINTK_FLAGS_DEFAULT }; \
> ......
>
> So the prefix won't appear in dynamic_debug/control as the "format" string.
>
> Do you think we should use pr_fmt(fmt) to construct _ddebug descriptor?
> { KBUILD_MODNAME, __func__, __FILE__, pr_fmt(fmt), __LINE__, \
>
> Otherwise, I still have to add "mwifiex: " prefix for every pr_debug() call.
No, I believe that's incorrect.
#define dynamic_pr_debug(fmt, ...) do { \
static struct _ddebug descriptor \
__used \
__attribute__((section("__verbose"), aligned(8))) = \
{ KBUILD_MODNAME, __func__, __FILE__, fmt, __LINE__, \
_DPRINTK_FLAGS_DEFAULT }; \
if (unlikely(descriptor.enabled)) \
printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); \
} while (0)
dynamic_pr_debug does emit the format string
with pr_fmt(fmt).
next prev parent reply other threads:[~2011-03-03 22:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-02 22:31 [PATCH v2] mwifiex: remove PRINTM/HEXDUMP and associated Bing Zhao
2011-03-03 8:07 ` Joe Perches
2011-03-03 19:24 ` Bing Zhao
2011-03-03 20:10 ` Joe Perches
2011-03-03 20:58 ` Bing Zhao
2011-03-03 22:04 ` Bing Zhao
2011-03-03 22:40 ` Joe Perches [this message]
2011-03-04 0:35 ` Joe Perches
2011-03-04 0:59 ` Bing Zhao
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=1299192012.4338.170.camel@Joe-Laptop \
--to=joe@perches.com \
--cc=akarwar@marvell.com \
--cc=bzhao@marvell.com \
--cc=dkiran@marvell.com \
--cc=frankh@marvell.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=yangyang@marvell.com \
--cc=yogeshp@marvell.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox