[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 05/22] pc: replace pm object initialization with one-
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 05/22] pc: replace pm object initialization with one-liner in acpi_get_pm_info() |
Date: |
Tue, 13 Mar 2018 23:45:15 +0200 |
From: Igor Mammedov <address@hidden>
next patch will need it before it gets to piix4/lpc branches
that initializes 'obj' now.
Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Eric Auger <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Tested-by: Eric Auger <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/i386/acpi-build.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index deb440f..b85fefe 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -128,7 +128,7 @@ static void acpi_get_pm_info(AcpiPmInfo *pm)
{
Object *piix = piix4_pm_find();
Object *lpc = ich9_lpc_find();
- Object *obj = NULL;
+ Object *obj = piix ? piix : lpc;
QObject *o;
pm->force_rev1_fadt = false;
@@ -138,7 +138,6 @@ static void acpi_get_pm_info(AcpiPmInfo *pm)
if (piix) {
/* w2k requires FADT(rev1) or it won't boot, keep PC compatible */
pm->force_rev1_fadt = true;
- obj = piix;
pm->cpu_hp_io_base = PIIX4_CPU_HOTPLUG_IO_BASE;
pm->pcihp_io_base =
object_property_get_uint(obj, ACPI_PCIHP_IO_BASE_PROP, NULL);
@@ -146,7 +145,6 @@ static void acpi_get_pm_info(AcpiPmInfo *pm)
object_property_get_uint(obj, ACPI_PCIHP_IO_LEN_PROP, NULL);
}
if (lpc) {
- obj = lpc;
pm->cpu_hp_io_base = ICH9_CPU_HOTPLUG_IO_BASE;
}
assert(obj);
--
MST
- [Qemu-devel] [PULL 00/22] virtio,vhost,pci,pc: features, cleanups, Michael S. Tsirkin, 2018/03/13
- [Qemu-devel] [PULL 02/22] virtio-net: use 64-bit values for feature flags, Michael S. Tsirkin, 2018/03/13
- [Qemu-devel] [PULL 04/22] acpi: remove unused acpi-dsdt.aml, Michael S. Tsirkin, 2018/03/13
- [Qemu-devel] [PULL 03/22] virtio-net: add linkspeed and duplex settings to virtio-net, Michael S. Tsirkin, 2018/03/13
- [Qemu-devel] [PULL 05/22] pc: replace pm object initialization with one-liner in acpi_get_pm_info(),
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 07/22] acpi: add build_append_gas() helper for Generic Address Structure, Michael S. Tsirkin, 2018/03/13
- [Qemu-devel] [PULL 06/22] acpi: reuse AcpiGenericAddress instead of Acpi20GenericAddress, Michael S. Tsirkin, 2018/03/13
- [Qemu-devel] [PULL 08/22] acpi: move ACPI_PORT_SMI_CMD define to header it belongs to, Michael S. Tsirkin, 2018/03/13
- [Qemu-devel] [PULL 01/22] scripts/update-linux-headers: add ethtool.h and update to 4.16.0-rc4, Michael S. Tsirkin, 2018/03/13
- [Qemu-devel] [PULL 10/22] pc: acpi: use build_append_foo() API to construct FADT, Michael S. Tsirkin, 2018/03/13
- [Qemu-devel] [PULL 09/22] pc: acpi: isolate FADT specific data into AcpiFadtData structure, Michael S. Tsirkin, 2018/03/13
- [Qemu-devel] [PULL 13/22] tests: acpi: don't read all fields in test_acpi_fadt_table(), Michael S. Tsirkin, 2018/03/13
- [Qemu-devel] [PULL 15/22] qemu-options-wrapper.h: fix include patch, Michael S. Tsirkin, 2018/03/13
- [Qemu-devel] [PULL 14/22] vhost: used_memslots refactoring, Michael S. Tsirkin, 2018/03/13
- [Qemu-devel] [PULL 12/22] virt_arm: acpi: reuse common build_fadt(), Michael S. Tsirkin, 2018/03/13