Received: from eggs.gnu.org ([2001:4830:134:3::10]:50510) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCtwn-00058S-IB for qemu-devel@nongnu.org; Mon, 10 Feb 2014 11:43:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WCtwh-0005A5-89 for qemu-devel@nongnu.org; Mon, 10 Feb 2014 11:43:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:14887) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCtwh-00059z-08 for qemu-devel@nongnu.org; Mon, 10 Feb 2014 11:42:59 -0500 Date: Mon, 10 Feb 2014 18:47:46 +0200 From: "Michael S. Tsirkin" Message-ID: <1392050814-31814-3-git-send-email-mst@redhat.com> References: <1392050814-31814-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1392050814-31814-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL 02/20] pcihp: replace enable|disable_device() with oneliners List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Anthony Liguori , Igor Mammedov From: Igor Mammedov enable_device() and disable_device() functions aren't reused anywere, so replace them with respective oneliners at call sites. Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/acpi/pcihp.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c index 4345f5d..464739a 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; -- MST