Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3759809pxb; Sat, 13 Feb 2021 08:17:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJznV+fjeU24exsd4tvFsc6+rFoH4VwO2RZAT8zj0SZFkTkvLxneGwq1CLuFz3ieupR67QML X-Received: by 2002:a17:906:2bce:: with SMTP id n14mr7779342ejg.171.1613233073518; Sat, 13 Feb 2021 08:17:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613233073; cv=none; d=google.com; s=arc-20160816; b=jky5U//1/0GkuPBPOz9Yp9ZgxNMU+JPAOZ7wmDdfwkMEWVGyUe55aZYgnEa5t8mpBV +1ID3MmOqfYu/4JnH9L7z6tp06HakrNpj4trf1nGvevpMsUz3JNoUXZaU9XbCjgYCEFj goHR0/qu5VYOuD1BPZztI23ABFqKXDYcbb95FiPhfqO/RGxqyxxyI3UFEKDhiBYv2abH 9df5AWqH9IOmvfnPJmrYS3DybBLEc9G6bxOIevXVlTc2l5yqMe7lVE2rIxKRDvYrlvz0 8mmdILcJMUoIgvAnh7mifLwdlzQKdQYunu5uSMqeQIKs1TCXZY6xF6jfHoMdOeE606ir znjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=VqM7nxweEKIgcOP8k1b+SCTCOeP+Smx4sajV72M09L4=; b=0jtpJpbuEQdaldXczI8H/4sYIieKKEhhxZ2v5yglAs/goCXuZkyPa+JMY6QwYfOMDL AkzBunZCI0dyIEJzZs1T6qx9dUY7n6x+GwEZTjRogYAGbCioONamnWmR2VULLxKEGmaL GnT5TG7Y6rSRUeBSLD9xfjQp+dpvyFWnMXUcb5RZjwDIvJ4MgM7AdKM9LNg/uRkteVkg ebrhGUQysCYFETUuMZbEKKB8Qiw1Dgko5xQ2oKSHcT1sqQd9+LlRbiEvWH442+MoLBav fh+qxyV4RYvSvMB2c7iNRZnIuklL9FEgPG6ja7b2unuSKdQke4lhMSFfvTJgrGAqVK01 zuIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=o7MIOGku; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id fx12si8282096ejb.286.2021.02.13.08.17.27; Sat, 13 Feb 2021 08:17:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=o7MIOGku; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229869AbhBMQNV (ORCPT + 99 others); Sat, 13 Feb 2021 11:13:21 -0500 Received: from linux.microsoft.com ([13.77.154.182]:35990 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229832AbhBMQMU (ORCPT ); Sat, 13 Feb 2021 11:12:20 -0500 Received: from localhost.localdomain (c-73-42-176-67.hsd1.wa.comcast.net [73.42.176.67]) by linux.microsoft.com (Postfix) with ESMTPSA id 5C66D20B57A8; Sat, 13 Feb 2021 08:11:01 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 5C66D20B57A8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1613232661; bh=VqM7nxweEKIgcOP8k1b+SCTCOeP+Smx4sajV72M09L4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o7MIOGkumBSvE1hOE2yI7b/vq6aQ3DgzkB3iIg2aENiJNHxglqYP2r3ciZTkVkbaT dR7JT1SFPKKSt+mQTSodWQpvQRSeLElOIgfCKVNoxPhjMgDLxG4Uj7RoQ4Fqwih+fY czurH+GKK2VpciAwZNYB8wX7LHGvTMVJM+sduF7A= From: Lakshmi Ramasubramanian To: zohar@linux.ibm.com, bauerman@linux.ibm.com, robh@kernel.org, takahiro.akashi@linaro.org, gregkh@linuxfoundation.org, will@kernel.org, joe@perches.com, catalin.marinas@arm.com, mpe@ellerman.id.au Cc: james.morse@arm.com, sashal@kernel.org, benh@kernel.crashing.org, paulus@samba.org, frowand.list@gmail.com, vincenzo.frascino@arm.com, mark.rutland@arm.com, dmitry.kasatkin@gmail.com, jmorris@namei.org, serge@hallyn.com, pasha.tatashin@soleen.com, allison@lohutok.net, masahiroy@kernel.org, mbrugger@suse.com, hsinyi@chromium.org, tao.li@vivo.com, christophe.leroy@c-s.fr, prsriva@linux.microsoft.com, balajib@linux.microsoft.com, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v18 10/11] powerpc: Delete unused function delete_fdt_mem_rsv() Date: Sat, 13 Feb 2021 08:10:48 -0800 Message-Id: <20210213161049.6190-11-nramas@linux.microsoft.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210213161049.6190-1-nramas@linux.microsoft.com> References: <20210213161049.6190-1-nramas@linux.microsoft.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org delete_fdt_mem_rsv() defined in "arch/powerpc/kexec/file_load.c" has been renamed to fdt_find_and_del_mem_rsv(), and moved to "drivers/of/kexec.c". Remove delete_fdt_mem_rsv() in "arch/powerpc/kexec/file_load.c". Co-developed-by: Prakhar Srivastava Signed-off-by: Prakhar Srivastava Signed-off-by: Lakshmi Ramasubramanian Reviewed-by: Thiago Jung Bauermann --- arch/powerpc/include/asm/kexec.h | 1 - arch/powerpc/kexec/file_load.c | 32 -------------------------------- 2 files changed, 33 deletions(-) diff --git a/arch/powerpc/include/asm/kexec.h b/arch/powerpc/include/asm/kexec.h index 783f6c4f3df9..1718fe5ae8d4 100644 --- a/arch/powerpc/include/asm/kexec.h +++ b/arch/powerpc/include/asm/kexec.h @@ -119,7 +119,6 @@ char *setup_kdump_cmdline(struct kimage *image, char *cmdline, int setup_purgatory(struct kimage *image, const void *slave_code, const void *fdt, unsigned long kernel_load_addr, unsigned long fdt_load_addr); -int delete_fdt_mem_rsv(void *fdt, unsigned long start, unsigned long size); #ifdef CONFIG_PPC64 struct kexec_buf; diff --git a/arch/powerpc/kexec/file_load.c b/arch/powerpc/kexec/file_load.c index 372fa5865413..264e2f66186d 100644 --- a/arch/powerpc/kexec/file_load.c +++ b/arch/powerpc/kexec/file_load.c @@ -107,35 +107,3 @@ int setup_purgatory(struct kimage *image, const void *slave_code, return 0; } - -/** - * delete_fdt_mem_rsv - delete memory reservation with given address and size - * - * Return: 0 on success, or negative errno on error. - */ -int delete_fdt_mem_rsv(void *fdt, unsigned long start, unsigned long size) -{ - int i, ret, num_rsvs = fdt_num_mem_rsv(fdt); - - for (i = 0; i < num_rsvs; i++) { - uint64_t rsv_start, rsv_size; - - ret = fdt_get_mem_rsv(fdt, i, &rsv_start, &rsv_size); - if (ret) { - pr_err("Malformed device tree.\n"); - return -EINVAL; - } - - if (rsv_start == start && rsv_size == size) { - ret = fdt_del_mem_rsv(fdt, i); - if (ret) { - pr_err("Error deleting device tree reservation.\n"); - return -EINVAL; - } - - return 0; - } - } - - return -ENOENT; -} -- 2.30.0