From patchwork Fri Apr 4 12:25:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 27812 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f69.google.com (mail-pa0-f69.google.com [209.85.220.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2A28120369 for ; Fri, 4 Apr 2014 12:28:49 +0000 (UTC) Received: by mail-pa0-f69.google.com with SMTP id fb1sf12354082pad.8 for ; Fri, 04 Apr 2014 05:28:48 -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:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=f3ZVxQwo7tk2e5fz5uwbO+80BVCq+leOuKeNenfL/q8=; b=lsdWBq+GIPFFVRdxcgxUDxW4CiL4IfT9E5yg7VImuSI7WvFe2/8c/HL8UmJ0sxOwT7 NjwcFvO5hSRlPij6m7ZOPH/3bZmom9kS5KBwDSTw9i3sbGpxm+qVSmTBgTFvSiISan7g T0zcgSNNVxmrldLQSxc4UjamThoW1Iwy0CKYyYF46jcq6K+e77u5dMEThvDPfxCvBaLP l7sYuTbeNd2fqA0i6p323hkvvIquREcfY5pYEZfpk3XGLuVu/BbyY0uiW+yjEt43VPSH IzF7h9U57/izwF4nDHSzrXJDO2PbTG2pfJfOfpoPlFU2+guZSe06oObzqzshwGuYH2my ZE7A== X-Gm-Message-State: ALoCoQkpKouIksjKCogOi+/IJcH/kePUkYREhhwmC1r9W64RuEsVjtIUAZCX0Ycnz+1xfFNmnTpv X-Received: by 10.66.157.35 with SMTP id wj3mr4949920pab.11.1396614528428; Fri, 04 Apr 2014 05:28:48 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.38.177 with SMTP id t46ls969704qgt.16.gmail; Fri, 04 Apr 2014 05:28:48 -0700 (PDT) X-Received: by 10.52.15.132 with SMTP id x4mr396904vdc.31.1396614528260; Fri, 04 Apr 2014 05:28:48 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id qo8si1747758vcb.59.2014.04.04.05.28.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 04 Apr 2014 05:28:48 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id lg15so3108015vcb.30 for ; Fri, 04 Apr 2014 05:28:48 -0700 (PDT) X-Received: by 10.58.74.38 with SMTP id q6mr4818511vev.7.1396614528158; Fri, 04 Apr 2014 05:28:48 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.12.8 with SMTP id v8csp109788vcv; Fri, 4 Apr 2014 05:28:47 -0700 (PDT) X-Received: by 10.66.250.202 with SMTP id ze10mr14577572pac.153.1396614527319; Fri, 04 Apr 2014 05:28:47 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bs8si4549238pad.135.2014.04.04.05.28.46; Fri, 04 Apr 2014 05:28:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753190AbaDDM2h (ORCPT + 27 others); Fri, 4 Apr 2014 08:28:37 -0400 Received: from mail-wg0-f48.google.com ([74.125.82.48]:33978 "EHLO mail-wg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752729AbaDDM0g (ORCPT ); Fri, 4 Apr 2014 08:26:36 -0400 Received: by mail-wg0-f48.google.com with SMTP id l18so3344738wgh.31 for ; Fri, 04 Apr 2014 05:26:35 -0700 (PDT) X-Received: by 10.195.12.14 with SMTP id em14mr19538053wjd.15.1396614395539; Fri, 04 Apr 2014 05:26:35 -0700 (PDT) Received: from mohikan.mushroom.smurfnet.nu (cpc4-cmbg17-2-0-cust71.5-4.cable.virginm.net. [86.14.224.72]) by mx.google.com with ESMTPSA id u8sm855089wjq.1.2014.04.04.05.26.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Apr 2014 05:26:34 -0700 (PDT) From: Leif Lindholm To: linux-efi@vger.kernel.org, matt.fleming@intel.com Cc: linux-kernel@vger.kernel.org, Leif Lindholm Subject: [PATCH 1/5] efi: efi-stub-helper cleanup Date: Fri, 4 Apr 2014 13:25:46 +0100 Message-Id: <1396614350-20889-2-git-send-email-leif.lindholm@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1396614350-20889-1-git-send-email-leif.lindholm@linaro.org> References: <1396614350-20889-1-git-send-email-leif.lindholm@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: leif.lindholm@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.171 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 Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , An #ifdef CONFIG_ARM clause in efi-stub-helper.c got included with some of the generic stub rework by Roy Franz. Drop it here to make subsequent patches less confusing. Also, In handle_cmdline_files(), fh is not initialized, and while the overall logic around this handling appears safe, gcc does not always pick this up. Initialize to NULL to remove the resulting warning. Signed-off-by: Leif Lindholm --- drivers/firmware/efi/efi-stub-helper.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/drivers/firmware/efi/efi-stub-helper.c b/drivers/firmware/efi/efi-stub-helper.c index ff50aee..61230cb 100644 --- a/drivers/firmware/efi/efi-stub-helper.c +++ b/drivers/firmware/efi/efi-stub-helper.c @@ -267,7 +267,7 @@ static efi_status_t handle_cmdline_files(efi_system_table_t *sys_table_arg, struct file_info *files; unsigned long file_addr; u64 file_size_total; - efi_file_handle_t *fh; + efi_file_handle_t *fh = NULL; efi_status_t status; int nr_files; char *str; @@ -536,18 +536,8 @@ static char *efi_convert_cmdline_to_ascii(efi_system_table_t *sys_table_arg, } options_size++; /* NUL termination */ -#ifdef CONFIG_ARM - /* - * For ARM, allocate at a high address to avoid reserved - * regions at low addresses that we don't know the specfics of - * at the time we are processing the command line. - */ - status = efi_high_alloc(sys_table_arg, options_size, 0, - &cmdline_addr, 0xfffff000); -#else - status = efi_low_alloc(sys_table_arg, options_size, 0, - &cmdline_addr); -#endif + + status = efi_low_alloc(sys_table_arg, options_size, 0, &cmdline_addr); if (status != EFI_SUCCESS) return NULL;