From patchwork Tue Sep 24 00:01:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 277325 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 094542C0098 for ; Tue, 24 Sep 2013 10:02:09 +1000 (EST) Received: from localhost ([::1]:42799 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOG4s-0006Yn-MN for incoming@patchwork.ozlabs.org; Mon, 23 Sep 2013 20:02:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41889) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOG4c-0006Yi-C3 for qemu-devel@nongnu.org; Mon, 23 Sep 2013 20:01:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VOG4Y-0007Sw-FV for qemu-devel@nongnu.org; Mon, 23 Sep 2013 20:01:50 -0400 Received: from 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa ([2001:8b0:1d0::1]:44069 helo=mnementh.archaic.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOG4Y-0007R4-8T for qemu-devel@nongnu.org; Mon, 23 Sep 2013 20:01:46 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1VOG4P-0005Xl-5U; Tue, 24 Sep 2013 01:01:37 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Tue, 24 Sep 2013 01:01:37 +0100 Message-Id: <1379980897-21277-3-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1379980897-21277-1-git-send-email-peter.maydell@linaro.org> References: <1379980897-21277-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Cc: Grant Likely , =?UTF-8?q?Andreas=20F=C3=A4rber?= , patches@linaro.org Subject: [Qemu-devel] [PATCH 2/2] hw/arm: Tidy up conditional calls to arm_load_kernel X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Now that arm_load_kernel doesn't insist on a kernel filename being present, we can remove some unnecessary conditionals in board models. Signed-off-by: Peter Maydell --- hw/arm/omap_sx1.c | 10 ++++------ hw/arm/palm.c | 10 ++++------ hw/arm/z2.c | 12 +++++------- 3 files changed, 13 insertions(+), 19 deletions(-) diff --git a/hw/arm/omap_sx1.c b/hw/arm/omap_sx1.c index b0f8664..03b3816 100644 --- a/hw/arm/omap_sx1.c +++ b/hw/arm/omap_sx1.c @@ -194,12 +194,10 @@ static void sx1_init(QEMUMachineInitArgs *args, const int version) } /* Load the kernel. */ - if (args->kernel_filename) { - sx1_binfo.kernel_filename = args->kernel_filename; - sx1_binfo.kernel_cmdline = args->kernel_cmdline; - sx1_binfo.initrd_filename = args->initrd_filename; - arm_load_kernel(mpu->cpu, &sx1_binfo); - } + sx1_binfo.kernel_filename = args->kernel_filename; + sx1_binfo.kernel_cmdline = args->kernel_cmdline; + sx1_binfo.initrd_filename = args->initrd_filename; + arm_load_kernel(mpu->cpu, &sx1_binfo); /* TODO: fix next line */ //~ qemu_console_resize(ds, 640, 480); diff --git a/hw/arm/palm.c b/hw/arm/palm.c index 3e39044..0b72bbe 100644 --- a/hw/arm/palm.c +++ b/hw/arm/palm.c @@ -261,12 +261,10 @@ static void palmte_init(QEMUMachineInitArgs *args) } /* Load the kernel. */ - if (kernel_filename) { - palmte_binfo.kernel_filename = kernel_filename; - palmte_binfo.kernel_cmdline = kernel_cmdline; - palmte_binfo.initrd_filename = initrd_filename; - arm_load_kernel(mpu->cpu, &palmte_binfo); - } + palmte_binfo.kernel_filename = kernel_filename; + palmte_binfo.kernel_cmdline = kernel_cmdline; + palmte_binfo.initrd_filename = initrd_filename; + arm_load_kernel(mpu->cpu, &palmte_binfo); } static QEMUMachine palmte_machine = { diff --git a/hw/arm/z2.c b/hw/arm/z2.c index 2e0d5d4..a00fcc0 100644 --- a/hw/arm/z2.c +++ b/hw/arm/z2.c @@ -360,13 +360,11 @@ static void z2_init(QEMUMachineInitArgs *args) qdev_connect_gpio_out(mpu->gpio, Z2_GPIO_LCD_CS, qemu_allocate_irqs(z2_lcd_cs, z2_lcd, 1)[0]); - if (kernel_filename) { - z2_binfo.kernel_filename = kernel_filename; - z2_binfo.kernel_cmdline = kernel_cmdline; - z2_binfo.initrd_filename = initrd_filename; - z2_binfo.board_id = 0x6dd; - arm_load_kernel(mpu->cpu, &z2_binfo); - } + z2_binfo.kernel_filename = kernel_filename; + z2_binfo.kernel_cmdline = kernel_cmdline; + z2_binfo.initrd_filename = initrd_filename; + z2_binfo.board_id = 0x6dd; + arm_load_kernel(mpu->cpu, &z2_binfo); } static QEMUMachine z2_machine = {