From: Jim Cromie <jim.cromie@gmail•com>
To: linux-kernel@vger•kernel.org
Cc: Jim Cromie <jim.cromie@gmail•com>, Greg KH <greg@kroah•com>,
linux-next@vger•kernel.org,
Roland Dreier <roland@purestorage•com>,
Jason Baron <jbaron@redhat•com>, Joe Perches <joe@perches•com>
Subject: [PATCH] dynamic_debug: use printk(KERN_WARNING..) in stub function
Date: Tue, 1 May 2012 05:23:12 -0600 [thread overview]
Message-ID: <1335871392-2222-1-git-send-email-jim.cromie@gmail.com> (raw)
drivers/infiniband/ulp/srp/ib_srp.c #defines pr_fmt() PFX fmt, but PFX
is not #defined until after <linux/*> headers are included.
This results in a bad expansion of the pr_warn() in the stub function.
2084c2084
< printk("<4>" PFX "dyndbg supported only in " "CONFIG_DYNAMIC_DEBUG builds\n")
---
> printk("<4>" "guano" "dyndbg supported only in " "CONFIG_DYNAMIC_DEBUG builds\n")
(END)
While that use-case is less than ideal, it will probably happen again,
and its easy to avoid by using raw printk().
To: Bart Van Assche bvanassche@acm•org
To: Stephen Rothwell <sfr@canb•auug.org.au>
CC: Greg KH <greg@kroah•com>
CC: linux-next@vger•kernel.org
CC: Roland Dreier <roland@purestorage•com>
CC: Jason Baron <jbaron@redhat•com>
CC: Joe Perches <joe@perches•com>
Signed-off-by: Jim Cromie <jim.cromie@gmail•com>
---
include/linux/dynamic_debug.h | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h
index 4697e4b..c18257b 100644
--- a/include/linux/dynamic_debug.h
+++ b/include/linux/dynamic_debug.h
@@ -109,7 +109,8 @@ static inline int ddebug_dyndbg_module_param_cb(char *param, char *val,
const char *modname)
{
if (strstr(param, "dyndbg")) {
- pr_warn("dyndbg supported only in "
+ /* avoid pr_warn(), which wants pr_fmt() fully defined */
+ printk(KERN_WARNING "dyndbg param is supported only in "
"CONFIG_DYNAMIC_DEBUG builds\n");
return 0; /* allow and ignore */
}
--
1.7.7.6
next reply other threads:[~2012-05-01 11:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-01 11:23 Jim Cromie [this message]
2012-05-01 13:44 ` [PATCH] dynamic_debug: use printk(KERN_WARNING..) in stub function Greg KH
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=1335871392-2222-1-git-send-email-jim.cromie@gmail.com \
--to=jim.cromie@gmail$(echo .)com \
--cc=greg@kroah$(echo .)com \
--cc=jbaron@redhat$(echo .)com \
--cc=joe@perches$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=roland@purestorage$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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