diff options
author | Igor Mammedov | 2014-02-03 11:44:57 +0100 |
---|---|---|
committer | Michael S. Tsirkin | 2014-02-05 15:55:49 +0100 |
commit | 8f5001f9ede507940317531bc83154288e7a1d0a (patch) | |
tree | 80de283c6da7c5c3d66db3592b58b25dae724317 /hw/acpi/pcihp.c | |
parent | pcihp: reduce number of device check events (diff) | |
download | qemu-8f5001f9ede507940317531bc83154288e7a1d0a.tar.gz qemu-8f5001f9ede507940317531bc83154288e7a1d0a.tar.xz qemu-8f5001f9ede507940317531bc83154288e7a1d0a.zip |
pcihp: replace enable|disable_device() with oneliners
enable_device() and disable_device() functions aren't reused anywere,
so replace them with respective oneliners at call sites.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/acpi/pcihp.c')
-rw-r--r-- | hw/acpi/pcihp.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c index 4345f5d70d..464739aaa1 100644 --- a/hw/acpi/pcihp.c +++ b/hw/acpi/pcihp.c @@ -177,16 +177,6 @@ void acpi_pcihp_reset(AcpiPciHpState *s) acpi_pcihp_update(s); } -static void enable_device(AcpiPciHpState *s, unsigned bsel, int slot) -{ - s->acpi_pcihp_pci_status[bsel].up |= (1U << slot); -} - -static void disable_device(AcpiPciHpState *s, unsigned bsel, int slot) -{ - s->acpi_pcihp_pci_status[bsel].down |= (1U << slot); -} - int acpi_pcihp_device_hotplug(AcpiPciHpState *s, PCIDevice *dev, PCIHotplugState state) { @@ -204,9 +194,9 @@ int acpi_pcihp_device_hotplug(AcpiPciHpState *s, PCIDevice *dev, } if (state == PCI_HOTPLUG_ENABLED) { - enable_device(s, bsel, slot); + s->acpi_pcihp_pci_status[bsel].up |= (1U << slot); } else { - disable_device(s, bsel, slot); + s->acpi_pcihp_pci_status[bsel].down |= (1U << slot); } return 0; |