From ffa10cb47a94c9b456c83301c8047e2a898dd409 Mon Sep 17 00:00:00 2001 From: Jason Baron Date: Thu, 11 Aug 2011 14:36:48 -0400 Subject: dynamic_debug: make netdev_dbg() call __netdev_printk() Previously, if dynamic debug was enabled netdev_dbg() was using dynamic_dev_dbg() to print out the underlying msg. Fix this by making sure netdev_dbg() uses __netdev_printk(). Cc: David S. Miller Signed-off-by: Jason Baron Signed-off-by: Greg Kroah-Hartman --- lib/dynamic_debug.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'lib') diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 4fc03ddb05f2..ee3b9ba625c5 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -33,6 +33,7 @@ #include #include #include +#include extern struct _ddebug __start___verbose[]; extern struct _ddebug __stop___verbose[]; @@ -503,6 +504,30 @@ int __dynamic_dev_dbg(struct _ddebug *descriptor, } EXPORT_SYMBOL(__dynamic_dev_dbg); +int __dynamic_netdev_dbg(struct _ddebug *descriptor, + const struct net_device *dev, const char *fmt, ...) +{ + struct va_format vaf; + va_list args; + int res; + + BUG_ON(!descriptor); + BUG_ON(!fmt); + + va_start(args, fmt); + + vaf.fmt = fmt; + vaf.va = &args; + + res = dynamic_emit_prefix(descriptor); + res += __netdev_printk(KERN_CONT, dev, &vaf); + + va_end(args); + + return res; +} +EXPORT_SYMBOL(__dynamic_netdev_dbg); + static __initdata char ddebug_setup_string[1024]; static __init int ddebug_setup_query(char *str) { -- cgit v1.2.3