aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJason Baron <jbaron@redhat.com>2011-08-11 14:36:48 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-22 21:23:06 -0400
commitffa10cb47a94c9b456c83301c8047e2a898dd409 (patch)
treedd0fb674235c51d54fd80540420c23002795048e /lib
parentac0ac38f68be73b92dc390ceace50a0d143d76ae (diff)
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 <davem@davemloft.net> Signed-off-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/dynamic_debug.c25
1 files changed, 25 insertions, 0 deletions
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 @@
33#include <linux/hardirq.h> 33#include <linux/hardirq.h>
34#include <linux/sched.h> 34#include <linux/sched.h>
35#include <linux/device.h> 35#include <linux/device.h>
36#include <linux/netdevice.h>
36 37
37extern struct _ddebug __start___verbose[]; 38extern struct _ddebug __start___verbose[];
38extern struct _ddebug __stop___verbose[]; 39extern struct _ddebug __stop___verbose[];
@@ -503,6 +504,30 @@ int __dynamic_dev_dbg(struct _ddebug *descriptor,
503} 504}
504EXPORT_SYMBOL(__dynamic_dev_dbg); 505EXPORT_SYMBOL(__dynamic_dev_dbg);
505 506
507int __dynamic_netdev_dbg(struct _ddebug *descriptor,
508 const struct net_device *dev, const char *fmt, ...)
509{
510 struct va_format vaf;
511 va_list args;
512 int res;
513
514 BUG_ON(!descriptor);
515 BUG_ON(!fmt);
516
517 va_start(args, fmt);
518
519 vaf.fmt = fmt;
520 vaf.va = &args;
521
522 res = dynamic_emit_prefix(descriptor);
523 res += __netdev_printk(KERN_CONT, dev, &vaf);
524
525 va_end(args);
526
527 return res;
528}
529EXPORT_SYMBOL(__dynamic_netdev_dbg);
530
506static __initdata char ddebug_setup_string[1024]; 531static __initdata char ddebug_setup_string[1024];
507static __init int ddebug_setup_query(char *str) 532static __init int ddebug_setup_query(char *str)
508{ 533{