* [patch 1/3] Simplify initcall debug output
2008-02-18 16:34 [patch 0/3] simplify initcall & quirk debug output bjorn.helgaas
@ 2008-02-18 16:34 ` bjorn.helgaas
2008-02-18 16:34 ` [patch 2/3] PNP: Simplify quirk " bjorn.helgaas
2008-02-18 16:34 ` [patch 3/3] PCI: " bjorn.helgaas
2 siblings, 0 replies; 4+ messages in thread
From: bjorn.helgaas @ 2008-02-18 16:34 UTC (permalink / raw)
To: Andrew Morton; +Cc: Greg Kroah-Hartman, linux-kernel
[-- Attachment #1: initcall-debug --]
[-- Type: text/plain, Size: 2220 bytes --]
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>
Index: work6/init/main.c
===================================================================
--- work6.orig/init/main.c 2008-02-18 08:13:35.000000000 -0700
+++ work6/init/main.c 2008-02-18 08:42:37.000000000 -0700
@@ -680,10 +680,8 @@
int result;
if (initcall_debug) {
- printk("Calling initcall 0x%p", *call);
- print_fn_descriptor_symbol(": %s()",
+ print_fn_descriptor_symbol("calling %s()\n",
(unsigned long) *call);
- printk("\n");
t0 = ktime_get();
}
@@ -693,15 +691,10 @@
t1 = ktime_get();
delta = ktime_sub(t1, t0);
- printk("initcall 0x%p", *call);
- print_fn_descriptor_symbol(": %s()",
+ print_fn_descriptor_symbol("initcall %s()",
(unsigned long) *call);
- printk(" returned %d.\n", result);
-
- printk("initcall 0x%p ran for %Ld msecs: ",
- *call, (unsigned long long)delta.tv64 >> 20);
- print_fn_descriptor_symbol("%s()\n",
- (unsigned long) *call);
+ printk(" returned %d after %Ld msecs\n", result,
+ (unsigned long long) delta.tv64 >> 20);
}
if (result && result != -ENODEV && initcall_debug) {
@@ -717,10 +710,9 @@
local_irq_enable();
}
if (msg) {
- printk(KERN_WARNING "initcall at 0x%p", *call);
- print_fn_descriptor_symbol(": %s()",
+ print_fn_descriptor_symbol(KERN_WARNING "initcall %s()",
(unsigned long) *call);
- printk(": returned with %s\n", msg);
+ printk(" returned with %s\n", msg);
}
}
--
^ permalink raw reply [flat|nested] 4+ messages in thread
* [patch 2/3] PNP: Simplify quirk debug output
2008-02-18 16:34 [patch 0/3] simplify initcall & quirk debug output bjorn.helgaas
2008-02-18 16:34 ` [patch 1/3] Simplify initcall " bjorn.helgaas
@ 2008-02-18 16:34 ` bjorn.helgaas
2008-02-18 16:34 ` [patch 3/3] PCI: " bjorn.helgaas
2 siblings, 0 replies; 4+ messages in thread
From: bjorn.helgaas @ 2008-02-18 16:34 UTC (permalink / raw)
To: Andrew Morton; +Cc: Greg Kroah-Hartman, linux-kernel
[-- Attachment #1: pnp-quirk-debug --]
[-- Type: text/plain, Size: 709 bytes --]
print_fn_descriptor_symbol() prints the address if we don't have a symbol,
so no need to print both.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Index: work6/drivers/pnp/quirks.c
===================================================================
--- work6.orig/drivers/pnp/quirks.c 2008-02-18 08:12:18.000000000 -0700
+++ work6/drivers/pnp/quirks.c 2008-02-18 08:42:43.000000000 -0700
@@ -184,8 +184,8 @@
quirk = pnp_fixups[i].quirk_function;
#ifdef DEBUG
- dev_dbg(&dev->dev, "calling quirk 0x%p", quirk);
- print_fn_descriptor_symbol(": %s()\n",
+ dev_dbg(&dev->dev, "calling ");
+ print_fn_descriptor_symbol("%s()\n",
(unsigned long) *quirk);
#endif
(*quirk)(dev);
--
^ permalink raw reply [flat|nested] 4+ messages in thread
* [patch 3/3] PCI: Simplify quirk debug output
2008-02-18 16:34 [patch 0/3] simplify initcall & quirk debug output bjorn.helgaas
2008-02-18 16:34 ` [patch 1/3] Simplify initcall " bjorn.helgaas
2008-02-18 16:34 ` [patch 2/3] PNP: Simplify quirk " bjorn.helgaas
@ 2008-02-18 16:34 ` bjorn.helgaas
2 siblings, 0 replies; 4+ messages in thread
From: bjorn.helgaas @ 2008-02-18 16:34 UTC (permalink / raw)
To: Andrew Morton; +Cc: Greg Kroah-Hartman, linux-kernel
[-- Attachment #1: pci-quirk-debug --]
[-- Type: text/plain, Size: 810 bytes --]
print_fn_descriptor_symbol() prints the address if we don't have a symbol,
so no need to print both.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Index: work6/drivers/pci/quirks.c
===================================================================
--- work6.orig/drivers/pci/quirks.c 2008-02-18 08:12:18.000000000 -0700
+++ work6/drivers/pci/quirks.c 2008-02-18 08:42:45.000000000 -0700
@@ -1498,8 +1498,8 @@
if ((f->vendor == dev->vendor || f->vendor == (u16) PCI_ANY_ID) &&
(f->device == dev->device || f->device == (u16) PCI_ANY_ID)) {
#ifdef DEBUG
- dev_dbg(&dev->dev, "calling quirk 0x%p", f->hook);
- print_fn_descriptor_symbol(": %s()\n",
+ dev_dbg(&dev->dev, "calling ");
+ print_fn_descriptor_symbol("%s()\n",
(unsigned long) f->hook);
#endif
f->hook(dev);
--
^ permalink raw reply [flat|nested] 4+ messages in thread