From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:56464) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h24NY-0001tK-Tg for qemu-devel@nongnu.org; Thu, 07 Mar 2019 20:32:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h24NX-0008F4-00 for qemu-devel@nongnu.org; Thu, 07 Mar 2019 20:32:52 -0500 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 8 Mar 2019 02:32:05 +0100 Message-Id: <20190308013222.12524-2-philmd@redhat.com> In-Reply-To: <20190308013222.12524-1-philmd@redhat.com> References: <20190308013222.12524-1-philmd@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v2 01/18] hw/arm/virt: Remove null-check in virt_build_smbios() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek , Gerd Hoffmann , "Michael S. Tsirkin" , qemu-devel@nongnu.org Cc: Marcel Apfelbaum , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paolo Bonzini , Richard Henderson , Artyom Tarasenko , "Dr. David Alan Gilbert" , Peter Maydell , David Gibson , Igor Mammedov , Eric Blake , qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Markus Armbruster , Mark Cave-Ayland , Thomas Huth , "Daniel P . Berrange" Since commit 578f3c7b0835 ("arm: add fw_cfg to "virt" board", 2014-12-22), the machvirt_init() unconditionally creates the fw_cfg object. Later, commit c30e15658b1b ("smbios: implement smbios support for mach-virt", 2015-09-07) added a superfluous null-check on it. Remove this superfluous check. Fixes: c30e15658b1b Reviewed-by: Laszlo Ersek Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- v2: Corrected commit reference (Laszlo) --- hw/arm/virt.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index c7fb5348ae..bb7255a080 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1282,10 +1282,6 @@ static void virt_build_smbios(VirtMachineState *vm= s) size_t smbios_tables_len, smbios_anchor_len; const char *product =3D "QEMU Virtual Machine"; =20 - if (!vms->fw_cfg) { - return; - } - if (kvm_enabled()) { product =3D "KVM Virtual Machine"; } --=20 2.20.1