From: linas@austin.ibm.com (Linas Vepstas)
To: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Cc: Andrew Morton <akpm@osdl.org>,
linuxppc-dev@ozlabs.org, pcihpd-discuss@lists.sourceforge.net
Subject: [PATCH 11/19] PCI: rpaphp: remove print_slot_pci_funcs()
Date: Tue, 3 Apr 2007 12:25:54 -0500 (CDT) [thread overview]
Message-ID: <20070403172554.23FD53A65C@topology.austin.ibm.com> (raw)
In-Reply-To: 20070403164850.GP4922@austin.ibm.com>
The debug function print_slot_pci_funcs() is a large wrapper
around two debug print statements. Just invoke these directly.
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: John Rose <johnrose@austin.ibm.com>
----
drivers/pci/hotplug/rpaphp_pci.c | 23 +++++++----------------
1 file changed, 7 insertions(+), 16 deletions(-)
Index: linux-2.6.21-rc4-git4/drivers/pci/hotplug/rpaphp_pci.c
===================================================================
--- linux-2.6.21-rc4-git4.orig/drivers/pci/hotplug/rpaphp_pci.c 2007-04-03 11:04:28.000000000 -0500
+++ linux-2.6.21-rc4-git4/drivers/pci/hotplug/rpaphp_pci.c 2007-04-03 11:04:30.000000000 -0500
@@ -64,21 +64,6 @@ int rpaphp_get_sensor_state(struct slot
return rc;
}
-static void print_slot_pci_funcs(struct pci_bus *bus)
-{
- struct device_node *dn;
- struct pci_dev *dev;
-
- dn = pci_bus_to_OF_node(bus);
- if (!dn)
- return;
-
- dbg("%s: pci_devs of slot[%s]\n", __FUNCTION__, dn->full_name);
- list_for_each_entry (dev, &bus->devices, bus_list)
- dbg("\t%s\n", pci_name(dev));
- return;
-}
-
static void set_slot_name(struct slot *slot)
{
struct pci_bus *bus = slot->bus;
@@ -138,11 +123,17 @@ int rpaphp_register_pci_slot(struct slot
if (list_empty(&bus->devices))
pcibios_add_pci_devices(bus);
- print_slot_pci_funcs(bus);
if (!list_empty(&bus->devices)) {
info->adapter_status = CONFIGURED;
slot->state = CONFIGURED;
}
+
+ if (debug) {
+ struct pci_dev *dev;
+ dbg("%s: pci_devs of slot[%s]\n", __FUNCTION__, slot->dn->full_name);
+ list_for_each_entry (dev, &bus->devices, bus_list)
+ dbg("\t%s\n", pci_name(dev));
+ }
}
return rpaphp_register_slot(slot);
next reply other threads:[~2007-04-03 17:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-03 17:25 Linas Vepstas [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-04-03 0:26 [PATCH 0/19]: RPAPHP pci hotplug cleanup patchbomb Linas Vepstas
2007-04-03 0:43 ` [PATCH 11/19] PCI: rpaphp: remove print_slot_pci_funcs() Linas Vepstas
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=20070403172554.23FD53A65C@topology.austin.ibm.com \
--to=linas@austin.ibm.com \
--cc=akpm@osdl.org \
--cc=kristen.c.accardi@intel.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=pcihpd-discuss@lists.sourceforge.net \
/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;
as well as URLs for NNTP newsgroup(s).