public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: bjorn.helgaas@hp.com
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: linux-kernel@vger.kernel.org
Cc: linux-pci@atrey.karlin.mff.cuni.cz
Subject: [patch 1/3] PCI: print quirk name in debug messages
Date: Mon, 17 Dec 2007 14:09:38 -0700	[thread overview]
Message-ID: <20071217211336.846748677@ldl.fc.hp.com> (raw)
In-Reply-To: 20071217210937.103111394@ldl.fc.hp.com

[-- Attachment #1: pci-quirk-names --]
[-- Type: text/plain, Size: 1285 bytes --]

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 <bjorn.helgaas@hp.com>

Index: w/drivers/pci/quirks.c
===================================================================
--- w.orig/drivers/pci/quirks.c	2007-12-17 14:09:01.000000000 -0700
+++ w/drivers/pci/quirks.c	2007-12-17 14:09:03.000000000 -0700
@@ -21,6 +21,7 @@
 #include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/acpi.h>
+#include <linux/kallsyms.h>
 #include "pci.h"
 
 /* The Mellanox Tavor device gives false positive parity errors
@@ -1479,7 +1480,11 @@
 	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++;

--

  reply	other threads:[~2007-12-17 21:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-17 21:09 [patch 0/3] use dev_printk in PCI quirks bjorn.helgaas
2007-12-17 21:09 ` bjorn.helgaas [this message]
2007-12-17 21:09 ` [patch 2/3] PCI: use dev_printk in quirk messages bjorn.helgaas
2007-12-17 21:09 ` [patch 3/3] PCI: use dev_printk in x86 " bjorn.helgaas
2007-12-18 13:58   ` Ingo Molnar
2007-12-21 21:47     ` Andrew Morton
2007-12-21 22:29       ` Greg KH
2007-12-21 22:40         ` Ingo Molnar
2007-12-21 23:06           ` Greg KH
2007-12-22  2:10             ` Ingo Molnar
2008-01-22 17:45   ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071217211336.846748677@ldl.fc.hp.com \
    --to=bjorn.helgaas@hp.com \
    --cc=akpm@linux-foundation.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox