Received: from eggs.gnu.org ([2001:4830:134:3::10]:38392) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XI0fR-0000JM-1W for qemu-devel@nongnu.org; Thu, 14 Aug 2014 15:26:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XI0fI-0006Tc-KB for qemu-devel@nongnu.org; Thu, 14 Aug 2014 15:26:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26759) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XI0fI-0006TT-BU for qemu-devel@nongnu.org; Thu, 14 Aug 2014 15:26:24 -0400 From: Eduardo Habkost Date: Thu, 14 Aug 2014 16:25:32 -0300 Message-Id: <1408044362-11621-4-git-send-email-ehabkost@redhat.com> In-Reply-To: <1408044362-11621-1-git-send-email-ehabkost@redhat.com> References: <1408044362-11621-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH v4 03/33] pc: Eliminate has_pci_info global variable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Marcel Apfelbaum , "Michael S. Tsirkin" , Alexander Graf , Don Slutz , Igor Mammedov , =?UTF-8?q?Andreas=20F=C3=A4rber?= The variable is always set to false and never changed, so we simply don't need it. Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c | 5 +---- hw/i386/pc_q35.c | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 4f22be8..5287a84 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -59,7 +59,6 @@ static const int ide_iobase[MAX_IDE_BUS] = { 0x1f0, 0x170 }; static const int ide_iobase2[MAX_IDE_BUS] = { 0x3f6, 0x376 }; static const int ide_irq[MAX_IDE_BUS] = { 14, 15 }; -static bool has_pci_info; static bool has_acpi_build = true; static int legacy_acpi_table_size; static bool smbios_defaults = true; @@ -166,7 +165,7 @@ static void pc_init1(MachineState *machine, guest_info->has_acpi_build = has_acpi_build; guest_info->legacy_acpi_table_size = legacy_acpi_table_size; - guest_info->has_pci_info = has_pci_info; + guest_info->has_pci_info = false; guest_info->isapc_ram_fw = !pci_enabled; guest_info->has_reserved_memory = has_reserved_memory; @@ -340,7 +339,6 @@ static void pc_compat_1_7(MachineState *machine) static void pc_compat_1_6(MachineState *machine) { pc_compat_1_7(machine); - has_pci_info = false; rom_file_has_mr = false; has_acpi_build = false; } @@ -422,7 +420,6 @@ static void pc_init_pci_no_kvmclock(MachineState *machine) static void pc_init_isa(MachineState *machine) { - has_pci_info = false; has_acpi_build = false; smbios_defaults = false; gigabyte_align = false; diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index c39ee98..0abd56c 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -49,7 +49,6 @@ /* ICH9 AHCI has 6 ports */ #define MAX_SATA_PORTS 6 -static bool has_pci_info; static bool has_acpi_build = true; static bool smbios_defaults = true; static bool smbios_legacy_mode; @@ -150,7 +149,7 @@ static void pc_q35_init(MachineState *machine) } guest_info = pc_guest_info_init(below_4g_mem_size, above_4g_mem_size); - guest_info->has_pci_info = has_pci_info; + guest_info->has_pci_info = false; guest_info->isapc_ram_fw = false; guest_info->has_acpi_build = has_acpi_build; guest_info->has_reserved_memory = has_reserved_memory; @@ -296,7 +295,6 @@ static void pc_compat_1_7(MachineState *machine) static void pc_compat_1_6(MachineState *machine) { pc_compat_1_7(machine); - has_pci_info = false; rom_file_has_mr = false; has_acpi_build = false; } -- 1.9.3