aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2005-12-11 00:42:38 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-09 15:13:19 -0500
commitf5c99dfc11dce8f26c1ceedb6595fa0eac335ea3 (patch)
tree5373f5f12da8ff8225db41a4577dbecee835ca6f /drivers/pci
parentefbf62e9f4d93c3716a4d6d3221d537c71e299a2 (diff)
[PATCH] PCI: Reduce nr of ptr derefs in drivers/pci/hotplug/rpaphp_pci.c
Here's a small patch to reduce the nr. of pointer dereferences in drivers/pci/hotplug/rpaphp_pci.c Benefits: - micro speed optimization due to fewer pointer derefs - generated code should be slightly smaller - better readability note: due to lack of both hardware and cross-compile tools this patch is, unfortunately, completely untested. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/hotplug/rpaphp_pci.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/pci/hotplug/rpaphp_pci.c b/drivers/pci/hotplug/rpaphp_pci.c
index 6f21c73be3c0..396b54b0c847 100644
--- a/drivers/pci/hotplug/rpaphp_pci.c
+++ b/drivers/pci/hotplug/rpaphp_pci.c
@@ -336,13 +336,14 @@ EXPORT_SYMBOL_GPL(rpaphp_unconfig_pci_adapter);
336 336
337static int setup_pci_hotplug_slot_info(struct slot *slot) 337static int setup_pci_hotplug_slot_info(struct slot *slot)
338{ 338{
339 struct hotplug_slot_info *hotplug_slot_info = slot->hotplug_slot->info;
340
339 dbg("%s Initilize the PCI slot's hotplug->info structure ...\n", 341 dbg("%s Initilize the PCI slot's hotplug->info structure ...\n",
340 __FUNCTION__); 342 __FUNCTION__);
341 rpaphp_get_power_status(slot, &slot->hotplug_slot->info->power_status); 343 rpaphp_get_power_status(slot, &hotplug_slot_info->power_status);
342 rpaphp_get_pci_adapter_status(slot, 1, 344 rpaphp_get_pci_adapter_status(slot, 1,
343 &slot->hotplug_slot->info-> 345 &hotplug_slot_info->adapter_status);
344 adapter_status); 346 if (hotplug_slot_info->adapter_status == NOT_VALID) {
345 if (slot->hotplug_slot->info->adapter_status == NOT_VALID) {
346 err("%s: NOT_VALID: skip dn->full_name=%s\n", 347 err("%s: NOT_VALID: skip dn->full_name=%s\n",
347 __FUNCTION__, slot->dn->full_name); 348 __FUNCTION__, slot->dn->full_name);
348 return -EINVAL; 349 return -EINVAL;