diff options
author | Julia Lawall <julia@diku.dk> | 2008-10-22 19:44:00 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-10-22 19:44:00 -0400 |
commit | 05a34f51ba451c65773ad6f1acf4cc089cc474d8 (patch) | |
tree | 4f54ff88ee44c4778a22bbabc48fc2351ffb84e9 /drivers/pci/hotplug | |
parent | 1388cc964e680c1086ca0edae35be094cb29d51e (diff) |
PCI hotplug: fix logic in Compaq hotplug controller bus speed setup
The pattern !E && !E->fld is nonsensical. The patch below updates this
according to the assumption that && should be ||. But perhaps another
solution was intended.
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@disable and_comm@
expression E;
identifier fld;
@@
- !E && !E->fld
+ !E || !E->fld
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Reviewed-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r-- | drivers/pci/hotplug/cpqphp_ctrl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/cpqphp_ctrl.c b/drivers/pci/hotplug/cpqphp_ctrl.c index ef041ca91c27..a60a25290995 100644 --- a/drivers/pci/hotplug/cpqphp_ctrl.c +++ b/drivers/pci/hotplug/cpqphp_ctrl.c | |||
@@ -1139,7 +1139,7 @@ static u8 set_controller_speed(struct controller *ctrl, u8 adapter_speed, u8 hp_ | |||
1139 | for(slot = ctrl->slot; slot; slot = slot->next) { | 1139 | for(slot = ctrl->slot; slot; slot = slot->next) { |
1140 | if (slot->device == (hp_slot + ctrl->slot_device_offset)) | 1140 | if (slot->device == (hp_slot + ctrl->slot_device_offset)) |
1141 | continue; | 1141 | continue; |
1142 | if (!slot->hotplug_slot && !slot->hotplug_slot->info) | 1142 | if (!slot->hotplug_slot || !slot->hotplug_slot->info) |
1143 | continue; | 1143 | continue; |
1144 | if (slot->hotplug_slot->info->adapter_status == 0) | 1144 | if (slot->hotplug_slot->info->adapter_status == 0) |
1145 | continue; | 1145 | continue; |