From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=59205 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7Po3-0003S6-8O for qemu-devel@nongnu.org; Sun, 17 Oct 2010 05:45:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P7Po1-0007xN-Rh for qemu-devel@nongnu.org; Sun, 17 Oct 2010 05:45:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20447) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P7Po1-0007wc-LB for qemu-devel@nongnu.org; Sun, 17 Oct 2010 05:45:29 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o9H9jR04008676 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 17 Oct 2010 05:45:27 -0400 Received: from dhcp-1-237.tlv.redhat.com (dhcp-1-237.tlv.redhat.com [10.35.1.237]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o9H9jRkN015694 for ; Sun, 17 Oct 2010 05:45:28 -0400 From: Gleb Natapov Date: Sun, 17 Oct 2010 11:45:24 +0200 Message-Id: <1287308725-30811-1-git-send-email-gleb@redhat.com> Subject: [Qemu-devel] [PATCH 1/2] Use defines instead of numbers for pci hotplug sts bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Signed-off-by: Gleb Natapov --- hw/acpi_piix4.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c index c8733e5..bec42b4 100644 --- a/hw/acpi_piix4.c +++ b/hw/acpi_piix4.c @@ -38,6 +38,8 @@ #define PCI_BASE 0xae00 #define PCI_EJ_BASE 0xae08 +#define PIIX4_PCI_HOTPLUG_STATUS 2 + struct gpe_regs { uint16_t sts; /* status */ uint16_t en; /* enabled */ @@ -596,13 +598,13 @@ static void piix4_acpi_system_hot_add_init(PCIBus *bus, PIIX4PMState *s) static void enable_device(PIIX4PMState *s, int slot) { - s->gpe.sts |= 2; + s->gpe.sts |= PIIX4_PCI_HOTPLUG_STATUS; s->pci0_status.up |= (1 << slot); } static void disable_device(PIIX4PMState *s, int slot) { - s->gpe.sts |= 2; + s->gpe.sts |= PIIX4_PCI_HOTPLUG_STATUS; s->pci0_status.down |= (1 << slot); } -- 1.7.1