From helgaas@ldl.fc.hp.com Mon Dec 17 13:15:42 2007 From: bjorn.helgaas@hp.com Date: Mon, 17 Dec 2007 14:09:38 -0700 Subject: PCI: print quirk name in debug messages To: Andrew Morton Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Greg Kroah-Hartman Cc: David Brownell Cc: linux-kernel@vger.kernel.org Cc: linux-pci@atrey.karlin.mff.cuni.cz Message-ID: <20071217211336.846748677@ldl.fc.hp.com> Instead of printing this: PCI: Calling quirk c023b250 for 0000:00:00.0 we can print this: pci 0000:00:00.0: calling quirk 0xc023b270: quirk_cardbus_legacy+0x0/0x30() The address is superfluous because sprint_symbol() includes the address if the symbol lookup fails, but this is the same style used in do_initcalls() and pnp_fixup_device(). Signed-off-by: Bjorn Helgaas Signed-off-by: Greg Kroah-Hartman --- drivers/pci/quirks.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -21,6 +21,7 @@ #include #include #include +#include #include "pci.h" /* The Mellanox Tavor device gives false positive parity errors @@ -1500,7 +1501,11 @@ static void pci_do_fixups(struct pci_dev while (f < end) { if ((f->vendor == dev->vendor || f->vendor == (u16) PCI_ANY_ID) && (f->device == dev->device || f->device == (u16) PCI_ANY_ID)) { - pr_debug("PCI: Calling quirk %p for %s\n", f->hook, pci_name(dev)); +#ifdef DEBUG + dev_dbg(&dev->dev, "calling quirk 0x%p", f->hook); + print_fn_descriptor_symbol(": %s()\n", + (unsigned long) f->hook); +#endif f->hook(dev); } f++;