linux/drivers/pci
Julia Lawall b8d9cb2a22 PCI hotplug: remove redundant test in cpq hotplug
func is checked not to be NULL a few lines before.

A simplified version of the semantic patch that makes this change is as
follows: (http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
expression E;
position p1,p2;
@@

if (x@p1 == NULL || ...) { ... when forall
   return ...; }
... when != \(x=E\|x--\|x++\|--x\|++x\|x-=E\|x+=E\|x|=E\|x&=E\|&x\)
(
x@p2 == NULL
|
x@p2 != NULL
)

// another path to the test that is not through p1?
@s exists@
local idexpression r.x;
position r.p1,r.p2;
@@

... when != x@p1
(
x@p2 == NULL
|
x@p2 != NULL
)

@fix depends on !s@
position r.p1,r.p2;
expression x,E;
statement S1,S2;
@@

(
- if ((x@p2 != NULL) || ...)
  S1
|
- if ((x@p2 == NULL) && ...) S1
|
- BUG_ON(x@p2 == NULL);
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-01-07 11:13:22 -08:00
..
hotplug PCI hotplug: remove redundant test in cpq hotplug 2009-01-07 11:13:22 -08:00
pcie PCI: keep ASPM link state consistent throughout PCIe hierarchy 2009-01-07 11:13:20 -08:00
.gitignore
access.c PCI: add interface to set visible size of VPD 2009-01-07 11:13:18 -08:00
bus.c PCI: factor pci_bus_add_child() from pci_bus_add_devices() 2009-01-07 11:13:06 -08:00
dmar.c calculate agaw for each iommu 2009-01-03 14:02:18 +01:00
hotplug-pci.c PCI: fix section mismatch warning in pci_scan_child_bus 2008-03-04 15:07:03 -08:00
hotplug.c
htirq.c genirq: remove sparse irq code 2008-10-16 16:53:15 +02:00
intel-iommu.c intel-iommu: fix bit shift at DOMAIN_FLAG_P2P_MULTIPLE_DEVICES 2009-01-03 14:11:08 +01:00
intr_remapping.c sparseirq: fix !SMP building, #2 2008-12-17 00:15:55 +01:00
intr_remapping.h VT-d: Changes to support KVM 2008-10-15 14:24:08 +02:00
iova.c VT-d: Changes to support KVM 2008-10-15 14:24:08 +02:00
irq.c PCI: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-07 11:12:23 -08:00
Kconfig PCI: pci-stub module to reserve pci device 2009-01-07 11:12:38 -08:00
Makefile PCI: pci-stub module to reserve pci device 2009-01-07 11:12:38 -08:00
msi.c ACPI/PCI: PCI MSI _OSC support capabilities called when root bridge added 2009-01-07 11:12:31 -08:00
msi.h
pci-acpi.c pci-acpi: Cleanup _OSC evaluation code 2009-01-07 11:12:35 -08:00
pci-driver.c PCI: work_on_cpu: use in drivers/pci/pci-driver.c 2009-01-07 11:13:09 -08:00
pci-stub.c PCI: pci-stub module to reserve pci device 2009-01-07 11:12:38 -08:00
pci-sysfs.c PCI: revise VPD access interface 2009-01-07 11:13:17 -08:00
pci.c PCI: add pci_common_swizzle() for INTx swizzling 2009-01-07 11:13:12 -08:00
pci.h PCI: revise VPD access interface 2009-01-07 11:13:17 -08:00
probe.c PCI: set device wakeup capable flag if platform support is present 2009-01-07 11:13:07 -08:00
proc.c PCI: define PCI resource names in an 'enum' 2009-01-07 11:13:01 -08:00
quirks.c PCI quirks: piix3: warn softer about enabling passive release 2009-01-07 11:12:58 -08:00
remove.c PCI: fix sparse warning in pci_remove_behind_bridge 2008-10-20 10:54:25 -07:00
rom.c PCI: remove excess kernel-doc notation 2008-11-03 14:32:46 -08:00
search.c PCI: Fix reference counting bug 2008-10-22 16:42:35 -07:00
setup-bus.c PCI: use dev_printk for PCI bus resource mssages 2009-01-07 11:13:19 -08:00
setup-irq.c PCI: use dev_printk when possible 2008-06-25 16:05:13 -07:00
setup-res.c PCI: add a new function to map BAR offsets 2009-01-07 11:13:04 -08:00
slot.c PCI: stop leaking 'slot_name' in pci_create_slot 2008-12-09 14:36:03 -08:00
syscall.c PCI: remove unneeded lock_kernel() in drivers/pci/syscall.c. 2008-02-01 15:04:21 -08:00