dynamic_debug: use printk(KERN_WARNING..) in stub function
authorJim Cromie <jim.cromie@gmail.com>
Tue, 1 May 2012 11:23:12 +0000 (05:23 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 May 2012 12:58:06 +0000 (08:58 -0400)
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")

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/dynamic_debug.h

index 4697e4b59d6f24d65ea73cd6336df50fe398ec72..c18257b0fa7219df00fb5c991cfcfe7c8f5e135a 100644 (file)
@@ -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 */
        }