aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug
diff options
context:
space:
mode:
authorAlex Chiang <achiang@hp.com>2009-03-31 11:24:07 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-06-11 15:04:15 -0400
commite3265ea364c7ed5accc9955f8b805c380149870f (patch)
tree7c14d6c1f51a8094dce94bf949432ed33eb20aa6 /drivers/pci/hotplug
parentb019ee679afde950f2d01b1af0530453aa60af3f (diff)
PCI Hotplug: cpqphp: eliminate dead code - PCI_ScanBusNonBridge
I have no clue what the original intent here was, but the code as written is useless. The old dbg() statement above the old callsite might lead one to think that at one point, there was supposed to be some recursion, but any sense of sanity here has been lost to the ravages of time. Signed-off-by: Alex Chiang <achiang@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r--drivers/pci/hotplug/cpqphp_pci.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/pci/hotplug/cpqphp_pci.c b/drivers/pci/hotplug/cpqphp_pci.c
index 6201281b9dab..3e3acc7e7461 100644
--- a/drivers/pci/hotplug/cpqphp_pci.c
+++ b/drivers/pci/hotplug/cpqphp_pci.c
@@ -193,16 +193,6 @@ int cpqhp_set_irq (u8 bus_num, u8 dev_num, u8 int_pin, u8 irq_num)
193} 193}
194 194
195 195
196/*
197 * WTF??? This function isn't in the code, yet a function calls it, but the
198 * compiler optimizes it away? strange. Here as a placeholder to keep the
199 * compiler happy.
200 */
201static int PCI_ScanBusNonBridge (u8 bus, u8 device)
202{
203 return 0;
204}
205
206static int PCI_ScanBusForNonBridge(struct controller *ctrl, u8 bus_num, u8 * dev_num) 196static int PCI_ScanBusForNonBridge(struct controller *ctrl, u8 bus_num, u8 * dev_num)
207{ 197{
208 u16 tdevice; 198 u16 tdevice;
@@ -231,9 +221,9 @@ static int PCI_ScanBusForNonBridge(struct controller *ctrl, u8 bus_num, u8 * dev
231 /* Yep we got one. bridge ? */ 221 /* Yep we got one. bridge ? */
232 if ((work >> 8) == PCI_TO_PCI_BRIDGE_CLASS) { 222 if ((work >> 8) == PCI_TO_PCI_BRIDGE_CLASS) {
233 pci_bus_read_config_byte (ctrl->pci_bus, PCI_DEVFN(tdevice, 0), PCI_SECONDARY_BUS, &tbus); 223 pci_bus_read_config_byte (ctrl->pci_bus, PCI_DEVFN(tdevice, 0), PCI_SECONDARY_BUS, &tbus);
224 /* XXX: no recursion, wtf? */
234 dbg("Recurse on bus_num %d tdevice %d\n", tbus, tdevice); 225 dbg("Recurse on bus_num %d tdevice %d\n", tbus, tdevice);
235 if (PCI_ScanBusNonBridge(tbus, tdevice) == 0) 226 return 0;
236 return 0;
237 } 227 }
238 } 228 }
239 229