From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evrjW-0003q8-2T for qemu-devel@nongnu.org; Tue, 13 Mar 2018 17:45:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1evrjV-0007BP-BO for qemu-devel@nongnu.org; Tue, 13 Mar 2018 17:45:22 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:35336 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1evrjV-0007BE-5p for qemu-devel@nongnu.org; Tue, 13 Mar 2018 17:45:21 -0400 Date: Tue, 13 Mar 2018 23:45:15 +0200 From: "Michael S. Tsirkin" Message-ID: <1520977432-187679-6-git-send-email-mst@redhat.com> References: <1520977432-187679-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1520977432-187679-1-git-send-email-mst@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 05/22] pc: replace pm object initialization with one-liner in acpi_get_pm_info() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Igor Mammedov , Eric Auger , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= , Paolo Bonzini , Richard Henderson , Eduardo Habkost , Marcel Apfelbaum From: Igor Mammedov next patch will need it before it gets to piix4/lpc branches that initializes 'obj' now. Signed-off-by: Igor Mammedov Reviewed-by: Eric Auger Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Eric Auger Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- 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 =3D piix4_pm_find(); Object *lpc =3D ich9_lpc_find(); - Object *obj =3D NULL; + Object *obj =3D piix ? piix : lpc; QObject *o; =20 pm->force_rev1_fadt =3D 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 =3D true; - obj =3D piix; pm->cpu_hp_io_base =3D PIIX4_CPU_HOTPLUG_IO_BASE; pm->pcihp_io_base =3D 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 =3D lpc; pm->cpu_hp_io_base =3D ICH9_CPU_HOTPLUG_IO_BASE; } assert(obj); --=20 MST