aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-09-12 23:14:11 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-17 09:10:05 -0400
commit666f355f3805d68b6ed5f7013806f1f65abfbf03 (patch)
treea04490ab9e68e4113410b7e7399edb9369545dfe /lib
parent05e4e5b87aab74f994acf9dd4bed4a8f1367cd09 (diff)
device and dynamic_debug: Use dev_vprintk_emit and dev_printk_emit
Convert direct calls of vprintk_emit and printk_emit to the dev_ equivalents. Make create_syslog_header static. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: David S. Miller <davem@davemloft.net> Tested-by: Jim Cromie <jim.cromie@gmail.com> Acked-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/dynamic_debug.c31
1 files changed, 11 insertions, 20 deletions
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 6b3ebabacfa..e7f7d993357 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -591,15 +591,11 @@ int __dynamic_dev_dbg(struct _ddebug *descriptor,
591 res = printk(KERN_DEBUG "(NULL device *): %pV", &vaf); 591 res = printk(KERN_DEBUG "(NULL device *): %pV", &vaf);
592 } else { 592 } else {
593 char buf[PREFIX_SIZE]; 593 char buf[PREFIX_SIZE];
594 char dict[128];
595 size_t dictlen;
596 594
597 dictlen = create_syslog_header(dev, dict, sizeof(dict)); 595 res = dev_printk_emit(7, dev, "%s%s %s: %pV",
598 596 dynamic_emit_prefix(descriptor, buf),
599 res = printk_emit(0, 7, dictlen ? dict : NULL, dictlen, 597 dev_driver_string(dev), dev_name(dev),
600 "%s%s %s: %pV", 598 &vaf);
601 dynamic_emit_prefix(descriptor, buf),
602 dev_driver_string(dev), dev_name(dev), &vaf);
603 } 599 }
604 600
605 va_end(args); 601 va_end(args);
@@ -627,18 +623,13 @@ int __dynamic_netdev_dbg(struct _ddebug *descriptor,
627 623
628 if (dev && dev->dev.parent) { 624 if (dev && dev->dev.parent) {
629 char buf[PREFIX_SIZE]; 625 char buf[PREFIX_SIZE];
630 char dict[128]; 626
631 size_t dictlen; 627 res = dev_printk_emit(7, dev->dev.parent,
632 628 "%s%s %s %s: %pV",
633 dictlen = create_syslog_header(dev->dev.parent, 629 dynamic_emit_prefix(descriptor, buf),
634 dict, sizeof(dict)); 630 dev_driver_string(dev->dev.parent),
635 631 dev_name(dev->dev.parent),
636 res = printk_emit(0, 7, dictlen ? dict : NULL, dictlen, 632 netdev_name(dev), &vaf);
637 "%s%s %s %s: %pV",
638 dynamic_emit_prefix(descriptor, buf),
639 dev_driver_string(dev->dev.parent),
640 dev_name(dev->dev.parent),
641 netdev_name(dev), &vaf);
642 } else if (dev) { 633 } else if (dev) {
643 res = printk(KERN_DEBUG "%s: %pV", netdev_name(dev), &vaf); 634 res = printk(KERN_DEBUG "%s: %pV", netdev_name(dev), &vaf);
644 } else { 635 } else {