diff options
author | Joe Perches <joe@perches.com> | 2014-09-24 14:17:56 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-03 17:55:48 -0400 |
commit | 906d201530f2c52aeb4eee31895c71cdccf1e9a0 (patch) | |
tree | 77c67d28315ae374ad987d8e4aef3f413d06470f /lib | |
parent | 33ead538f642a33b1d658782a5d14a40b5014d1f (diff) |
dynamic_debug: change __dynamic_<foo>_dbg return types to void
The return value is not used by callers of these functions
so change the functions to return void.
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Jason Baron <jbaron@akamai.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dynamic_debug.c | 50 |
1 files changed, 20 insertions, 30 deletions
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index c9afbe2c445a..31fe79e31ab8 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c | |||
@@ -537,10 +537,9 @@ static char *dynamic_emit_prefix(const struct _ddebug *desc, char *buf) | |||
537 | return buf; | 537 | return buf; |
538 | } | 538 | } |
539 | 539 | ||
540 | int __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...) | 540 | void __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...) |
541 | { | 541 | { |
542 | va_list args; | 542 | va_list args; |
543 | int res; | ||
544 | struct va_format vaf; | 543 | struct va_format vaf; |
545 | char buf[PREFIX_SIZE]; | 544 | char buf[PREFIX_SIZE]; |
546 | 545 | ||
@@ -552,21 +551,17 @@ int __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...) | |||
552 | vaf.fmt = fmt; | 551 | vaf.fmt = fmt; |
553 | vaf.va = &args; | 552 | vaf.va = &args; |
554 | 553 | ||
555 | res = printk(KERN_DEBUG "%s%pV", | 554 | printk(KERN_DEBUG "%s%pV", dynamic_emit_prefix(descriptor, buf), &vaf); |
556 | dynamic_emit_prefix(descriptor, buf), &vaf); | ||
557 | 555 | ||
558 | va_end(args); | 556 | va_end(args); |
559 | |||
560 | return res; | ||
561 | } | 557 | } |
562 | EXPORT_SYMBOL(__dynamic_pr_debug); | 558 | EXPORT_SYMBOL(__dynamic_pr_debug); |
563 | 559 | ||
564 | int __dynamic_dev_dbg(struct _ddebug *descriptor, | 560 | void __dynamic_dev_dbg(struct _ddebug *descriptor, |
565 | const struct device *dev, const char *fmt, ...) | 561 | const struct device *dev, const char *fmt, ...) |
566 | { | 562 | { |
567 | struct va_format vaf; | 563 | struct va_format vaf; |
568 | va_list args; | 564 | va_list args; |
569 | int res; | ||
570 | 565 | ||
571 | BUG_ON(!descriptor); | 566 | BUG_ON(!descriptor); |
572 | BUG_ON(!fmt); | 567 | BUG_ON(!fmt); |
@@ -577,30 +572,27 @@ int __dynamic_dev_dbg(struct _ddebug *descriptor, | |||
577 | vaf.va = &args; | 572 | vaf.va = &args; |
578 | 573 | ||
579 | if (!dev) { | 574 | if (!dev) { |
580 | res = printk(KERN_DEBUG "(NULL device *): %pV", &vaf); | 575 | printk(KERN_DEBUG "(NULL device *): %pV", &vaf); |
581 | } else { | 576 | } else { |
582 | char buf[PREFIX_SIZE]; | 577 | char buf[PREFIX_SIZE]; |
583 | 578 | ||
584 | res = dev_printk_emit(7, dev, "%s%s %s: %pV", | 579 | dev_printk_emit(7, dev, "%s%s %s: %pV", |
585 | dynamic_emit_prefix(descriptor, buf), | 580 | dynamic_emit_prefix(descriptor, buf), |
586 | dev_driver_string(dev), dev_name(dev), | 581 | dev_driver_string(dev), dev_name(dev), |
587 | &vaf); | 582 | &vaf); |
588 | } | 583 | } |
589 | 584 | ||
590 | va_end(args); | 585 | va_end(args); |
591 | |||
592 | return res; | ||
593 | } | 586 | } |
594 | EXPORT_SYMBOL(__dynamic_dev_dbg); | 587 | EXPORT_SYMBOL(__dynamic_dev_dbg); |
595 | 588 | ||
596 | #ifdef CONFIG_NET | 589 | #ifdef CONFIG_NET |
597 | 590 | ||
598 | int __dynamic_netdev_dbg(struct _ddebug *descriptor, | 591 | void __dynamic_netdev_dbg(struct _ddebug *descriptor, |
599 | const struct net_device *dev, const char *fmt, ...) | 592 | const struct net_device *dev, const char *fmt, ...) |
600 | { | 593 | { |
601 | struct va_format vaf; | 594 | struct va_format vaf; |
602 | va_list args; | 595 | va_list args; |
603 | int res; | ||
604 | 596 | ||
605 | BUG_ON(!descriptor); | 597 | BUG_ON(!descriptor); |
606 | BUG_ON(!fmt); | 598 | BUG_ON(!fmt); |
@@ -613,23 +605,21 @@ int __dynamic_netdev_dbg(struct _ddebug *descriptor, | |||
613 | if (dev && dev->dev.parent) { | 605 | if (dev && dev->dev.parent) { |
614 | char buf[PREFIX_SIZE]; | 606 | char buf[PREFIX_SIZE]; |
615 | 607 | ||
616 | res = dev_printk_emit(7, dev->dev.parent, | 608 | dev_printk_emit(7, dev->dev.parent, |
617 | "%s%s %s %s%s: %pV", | 609 | "%s%s %s %s%s: %pV", |
618 | dynamic_emit_prefix(descriptor, buf), | 610 | dynamic_emit_prefix(descriptor, buf), |
619 | dev_driver_string(dev->dev.parent), | 611 | dev_driver_string(dev->dev.parent), |
620 | dev_name(dev->dev.parent), | 612 | dev_name(dev->dev.parent), |
621 | netdev_name(dev), netdev_reg_state(dev), | 613 | netdev_name(dev), netdev_reg_state(dev), |
622 | &vaf); | 614 | &vaf); |
623 | } else if (dev) { | 615 | } else if (dev) { |
624 | res = printk(KERN_DEBUG "%s%s: %pV", netdev_name(dev), | 616 | printk(KERN_DEBUG "%s%s: %pV", netdev_name(dev), |
625 | netdev_reg_state(dev), &vaf); | 617 | netdev_reg_state(dev), &vaf); |
626 | } else { | 618 | } else { |
627 | res = printk(KERN_DEBUG "(NULL net_device): %pV", &vaf); | 619 | printk(KERN_DEBUG "(NULL net_device): %pV", &vaf); |
628 | } | 620 | } |
629 | 621 | ||
630 | va_end(args); | 622 | va_end(args); |
631 | |||
632 | return res; | ||
633 | } | 623 | } |
634 | EXPORT_SYMBOL(__dynamic_netdev_dbg); | 624 | EXPORT_SYMBOL(__dynamic_netdev_dbg); |
635 | 625 | ||