Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dynamic_debug: use printk(KERN_WARNING..) in stub function

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>

authored by

Jim Cromie and committed by
Greg Kroah-Hartman
516cf1be 3ec5652a

+2 -1
+2 -1
include/linux/dynamic_debug.h
··· 109 109 const char *modname) 110 110 { 111 111 if (strstr(param, "dyndbg")) { 112 - pr_warn("dyndbg supported only in " 112 + /* avoid pr_warn(), which wants pr_fmt() fully defined */ 113 + printk(KERN_WARNING "dyndbg param is supported only in " 113 114 "CONFIG_DYNAMIC_DEBUG builds\n"); 114 115 return 0; /* allow and ignore */ 115 116 }