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

Simplify initcall_debug output

print_fn_descriptor_symbol() prints the address if we don't have a symbol, so
no need to print both.

Also, combine printing return value with elapsed time. Changes this:

Calling initcall 0xc05b7a70: pci_mmcfg_late_insert_resources+0x0/0x50()
initcall 0xc05b7a70: pci_mmcfg_late_insert_resources+0x0/0x50() returned 1.
initcall 0xc05b7a70 ran for 0 msecs: pci_mmcfg_late_insert_resources+0x0/0x50()
initcall at 0xc05b7a70: pci_mmcfg_late_insert_resources+0x0/0x50(): returned with error code 1

to this:

calling pci_mmcfg_late_insert_resources+0x0/0x50()
initcall pci_mmcfg_late_insert_resources+0x0/0x50() returned 1 after 0 msecs
initcall pci_mmcfg_late_insert_resources+0x0/0x50() returned with error code 1

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Bjorn Helgaas and committed by
Linus Torvalds
626adeb6 22caa041

+6 -14
+6 -14
init/main.c
··· 700 700 int result; 701 701 702 702 if (initcall_debug) { 703 - printk("Calling initcall 0x%p", *call); 704 - print_fn_descriptor_symbol(": %s()", 703 + print_fn_descriptor_symbol("calling %s()\n", 705 704 (unsigned long) *call); 706 - printk("\n"); 707 705 t0 = ktime_get(); 708 706 } 709 707 ··· 711 713 t1 = ktime_get(); 712 714 delta = ktime_sub(t1, t0); 713 715 714 - printk("initcall 0x%p", *call); 715 - print_fn_descriptor_symbol(": %s()", 716 + print_fn_descriptor_symbol("initcall %s()", 716 717 (unsigned long) *call); 717 - printk(" returned %d.\n", result); 718 - 719 - printk("initcall 0x%p ran for %Ld msecs: ", 720 - *call, (unsigned long long)delta.tv64 >> 20); 721 - print_fn_descriptor_symbol("%s()\n", 722 - (unsigned long) *call); 718 + printk(" returned %d after %Ld msecs\n", result, 719 + (unsigned long long) delta.tv64 >> 20); 723 720 } 724 721 725 722 if (result && result != -ENODEV && initcall_debug) { ··· 730 737 local_irq_enable(); 731 738 } 732 739 if (msg) { 733 - printk(KERN_WARNING "initcall at 0x%p", *call); 734 - print_fn_descriptor_symbol(": %s()", 740 + print_fn_descriptor_symbol(KERN_WARNING "initcall %s()", 735 741 (unsigned long) *call); 736 - printk(": returned with %s\n", msg); 742 + printk(" returned with %s\n", msg); 737 743 } 738 744 } 739 745