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: 20549 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C68A325E03 for ; Tue, 24 Sep 2013 00:01:42 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id a41sf3957669yho.2 for ; Mon, 23 Sep 2013 17:01:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=2X12o40IAy2BdNmwv1EwS83lm5aaXYERYkpUxsmeVMg=; b=Jh+0cZj7DYfn/5ti71ElS2ti/qpFanMfdkt57yNqSvOWzgjFxh6vZuUfPT8BpY0+1q sRc3kjmdDvDtxzMgrTXyXuU+/PrzyKX1kDZ9eKxK2FeIEfc6/zpBdCxi/ObCgjAsMK+j 1b6lHjfC0OYJmULoQi6Y/+lDyz5zoytSSK6LSi19Ag01eNEEPAgHFc1nDnPnHVkqIz7K AEknx/VGdMvtrnhsvE0oGRgQn4Ox+c1KRJ/8en0tNCNEO0iXfcVPy9KTDX5ZkHpDtuCn HwVcV1lobbwyX0+JiZtR1P7UftXfkJtwu5oP/pha0HWoSVQ7atgXkdjEbMqur3qf9Ujm +Vtg== X-Gm-Message-State: ALoCoQn2KktYSmEkHJzSHkQELefjSO/3RO304t/nw3F3+phfQlTIIhsYQhwzkEUWoUHz0vq81jW+ X-Received: by 10.224.93.19 with SMTP id t19mr11468303qam.3.1379980902593; Mon, 23 Sep 2013 17:01:42 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.71.209 with SMTP id x17ls1394003qeu.83.gmail; Mon, 23 Sep 2013 17:01:42 -0700 (PDT) X-Received: by 10.220.1.203 with SMTP id 11mr24505817vcg.15.1379980902495; Mon, 23 Sep 2013 17:01:42 -0700 (PDT) Received: from mail-vb0-f52.google.com (mail-vb0-f52.google.com [209.85.212.52]) by mx.google.com with ESMTPS id wh9si7599616vcb.93.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 23 Sep 2013 17:01:42 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.52 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.52; Received: by mail-vb0-f52.google.com with SMTP id f12so2708244vbg.25 for ; Mon, 23 Sep 2013 17:01:42 -0700 (PDT) X-Received: by 10.220.91.16 with SMTP id k16mr4194651vcm.21.1379980902394; Mon, 23 Sep 2013 17:01:42 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp210361vcz; Mon, 23 Sep 2013 17:01:41 -0700 (PDT) X-Received: by 10.14.122.132 with SMTP id t4mr41694224eeh.20.1379980900247; Mon, 23 Sep 2013 17:01:40 -0700 (PDT) Received: from mnementh.archaic.org.uk (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]) by mx.google.com with ESMTPS id c49si24737939eeg.297.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 23 Sep 2013 17:01:40 -0700 (PDT) Received-SPF: neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=2001:8b0:1d0::1; 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 Cc: patches@linaro.org, =?UTF-8?q?Andreas=20F=C3=A4rber?= , Grant Likely Subject: [PATCH 2/2] hw/arm: Tidy up conditional calls to arm_load_kernel 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.52 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 = {