From patchwork Tue Nov 10 04:45:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fu Wei Fu X-Patchwork-Id: 56285 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp556802lbb; Mon, 9 Nov 2015 20:46:10 -0800 (PST) X-Received: by 10.140.91.78 with SMTP id y72mr1814820qgd.68.1447130770505; Mon, 09 Nov 2015 20:46:10 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 1si1386688qgg.75.2015.11.09.20.46.10 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 09 Nov 2015 20:46:10 -0800 (PST) Received-SPF: pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=grub-devel-bounces+patch=linaro.org@gnu.org Received: from localhost ([::1]:57485 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zw0or-0008ML-VJ for patch@linaro.org; Mon, 09 Nov 2015 23:46:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57038) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zw0od-0008M3-Mk for grub-devel@gnu.org; Mon, 09 Nov 2015 23:45:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zw0oa-0007EE-DM for grub-devel@gnu.org; Mon, 09 Nov 2015 23:45:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39243) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zw0oa-0007EA-7N for grub-devel@gnu.org; Mon, 09 Nov 2015 23:45:52 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 9756AC0AEE44; Tue, 10 Nov 2015 04:45:51 +0000 (UTC) Received: from magi-f22.redhat.com (vpn1-6-118.pek2.redhat.com [10.72.6.118]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tAA4jj3A018162; Mon, 9 Nov 2015 23:45:46 -0500 From: fu.wei@linaro.org To: grub-devel@gnu.org, arvidjaar@gmail.com, phcoder@gmail.com Subject: [PATCH] arm64: clean up a useless variable in xen_boot.c Date: Tue, 10 Nov 2015 12:45:43 +0800 Message-Id: <1447130743-8397-1-git-send-email-fu.wei@linaro.org> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: xen-devel@lists.xensource.com, Ian.Campbell@citrix.com, stefano.stabellini@eu.citrix.com, jcm@redhat.com, leif.lindholm@linaro.org, linaro-uefi@lists.linaro.org, Fu Wei X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: grub-devel-bounces+patch=linaro.org@gnu.org Sender: grub-devel-bounces+patch=linaro.org@gnu.org From: Fu Wei This patch delete "file_name_index" variable and related comment. They are for xen_module command which has been deleted. Signed-off-by: Fu Wei --- grub-core/loader/arm64/xen_boot.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) -- 2.5.0 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c index fc5bb0c..d1a2189 100644 --- a/grub-core/loader/arm64/xen_boot.c +++ b/grub-core/loader/arm64/xen_boot.c @@ -136,16 +136,10 @@ xen_boot_address_align (grub_addr_t start, grub_size_t align) return (align ? (ALIGN_UP (start, align)) : start); } -/* Parse the option of xen_module command. For now, we support - (1) --type - We also set up the type of module in this function. - If there are some "--type" options in the command line, - we make a custom compatible stream in this function. */ +/* set module type according to command name. */ static grub_err_t -set_module_type (grub_command_t cmd, struct xen_boot_binary *module, int *file_name_index) +set_module_type (grub_command_t cmd, struct xen_boot_binary *module) { - *file_name_index = 0; - if (!grub_strcmp (cmd->name, "xen_linux")) module->node_info.type = MODULE_IMAGE; else if (!grub_strcmp (cmd->name, "xen_initrd")) @@ -440,7 +434,6 @@ grub_cmd_xen_module (grub_command_t cmd, int argc, char *argv[]) { struct xen_boot_binary *module = NULL; - int file_name_index = 0; grub_file_t file = 0; if (!argc) @@ -462,8 +455,7 @@ grub_cmd_xen_module (grub_command_t cmd, int argc, char *argv[]) return grub_errno; /* process all the options and get module type */ - if (set_module_type (cmd, module, &file_name_index) != - GRUB_ERR_NONE) + if (set_module_type (cmd, module) != GRUB_ERR_NONE) goto fail; switch (module->node_info.type) { @@ -491,12 +483,11 @@ grub_cmd_xen_module (grub_command_t cmd, int argc, char *argv[]) module->name, module->node_info.compat_string, module->node_info.compat_string_size); - file = grub_file_open (argv[file_name_index]); + file = grub_file_open (argv[0]); if (!file) goto fail; - xen_boot_binary_load (module, file, argc - file_name_index, - argv + file_name_index); + xen_boot_binary_load (module, file, argc, argv); if (grub_errno == GRUB_ERR_NONE) grub_list_push (GRUB_AS_LIST_P (&module_head), GRUB_AS_LIST (module));