From patchwork Mon Mar 17 08:33:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 874147 Delivered-To: patch@linaro.org Received: by 2002:a5d:4308:0:b0:38f:210b:807b with SMTP id h8csp1869765wrq; Mon, 17 Mar 2025 01:34:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUUKeIeWJgu3KfzDM73QpX7MrUDJ8CVPFaoWvJvp/h2uvrVl7iK48L2XNmQiVPZwF7R1IOsoA==@linaro.org X-Google-Smtp-Source: AGHT+IEdhEWCHYModVcRxcw1gHXlw4sFcf1iGEI+EYRNqeroB5jA95ItHUtYnlIURqtTrIBeOhln X-Received: by 2002:a17:907:2dac:b0:ac2:7a3b:31ef with SMTP id a640c23a62f3a-ac33037158bmr1439960566b.41.1742200482988; Mon, 17 Mar 2025 01:34:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742200482; cv=none; d=google.com; s=arc-20240605; b=NzBxB2M3Pxmb7g9VQx9RkTT7eFaOfWkffA6kvqA1WczaWlzV904uIqgKeSCZbHHDYE 6N4smvYNYRn6Hhngqx8laxQEk6eFEgEmbFFYcmu9GwCQNC7Ak8hIfIY3NOphq5FQ05iP dG/Uf5XShjOX2gyxq3Vtxp5dTjfvVka1pJINt4kUm4g8hyzb2Yq/w69K886DmeiJEbHA dXSwVj52xjZza9Qcs0CdY/WjyGA4Nb4ibuPU3FXvmTStbIMGDOKRDojxZMhkyqlgiiWJ X4j3YTLI96DQzwFQdFp85ENabsQTgDLerWHCO4gmP4jSHAs/NcynZmu9pAm3UxgIbfKw Bo1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=qiwHl2Ke/4d5Wbftn2oIiAyMIVWt2nO/8EP2SdCkBR8=; fh=Evn5eBx2ytD/hj+tB8Xv1T61prWYrP0E59LRKWAPORI=; b=WG4Cf2sbjb3r6l7+tnuba2VyO4b4cRsLepIjTyOCaOrWUVD1Hhi3Uj9yJDtNy2n6kC 3DYWp1OHB3KrFOe55b1DQPj0pZlZTeC7xkIPhLKu4/IGrzLREwPJcYch23herAK8/fG7 /YMweUqZfe+Qi3rsbuG/bX+7amuHXmHsZDwwtltQweRjYBOdZoqLlic00kP02YsA4mGu TNKN+JPZXrymJsDNmKWQBYIWc8rbrsWlGZ8bRC2eUolSnWatiDDi3rFDti1wL78WJQjF TeKe/8qJMknjPvgI6TGo5A91KZ367Ss9LXwoTIVeYWTr5aqPt8Fs/R1FZ1fQOBcqt3CQ BkkA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id a640c23a62f3a-ac33ddeac98si428366066b.777.2025.03.17.01.34.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Mar 2025 01:34:42 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7443E81101; Mon, 17 Mar 2025 09:34:33 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 002E781101; Mon, 17 Mar 2025 09:34:31 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id ECB5D80107 for ; Mon, 17 Mar 2025 09:34:29 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sughosh.ganu@linaro.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5D38813D5; Mon, 17 Mar 2025 01:34:38 -0700 (PDT) Received: from a079122.blr.arm.com (a079122.arm.com [10.162.17.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E6ECB3F673; Mon, 17 Mar 2025 01:34:26 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Simon Glass , Tom Rini , Heinrich Schuchardt , Anton Antonov , Tobias Waldekranz , Sughosh Ganu Subject: [PATCH v9 1/8] efi_loader: remove unused code from copy_fdt() Date: Mon, 17 Mar 2025 14:03:55 +0530 Message-Id: <20250317083402.412310-2-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250317083402.412310-1-sughosh.ganu@linaro.org> References: <20250317083402.412310-1-sughosh.ganu@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean There is logic in the copy_fdt() function which is iterating over the platform's DRAM banks and setting the fdt_ram_start variable. However, this variable is not used subsequently in the function. Remove this superfluous code. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas Reviewed-by: Heinrich Schuchardt --- Changes since V8: None lib/efi_loader/efi_helper.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/lib/efi_loader/efi_helper.c b/lib/efi_loader/efi_helper.c index 04b2efc4a3b..15ad042bc61 100644 --- a/lib/efi_loader/efi_helper.c +++ b/lib/efi_loader/efi_helper.c @@ -454,23 +454,11 @@ efi_status_t efi_env_set_load_options(efi_handle_t handle, */ static efi_status_t copy_fdt(void **fdtp) { - unsigned long fdt_ram_start = -1L, fdt_pages; + unsigned long fdt_pages; efi_status_t ret = 0; void *fdt, *new_fdt; u64 new_fdt_addr; uint fdt_size; - int i; - - for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { - u64 ram_start = gd->bd->bi_dram[i].start; - u64 ram_size = gd->bd->bi_dram[i].size; - - if (!ram_size) - continue; - - if (ram_start < fdt_ram_start) - fdt_ram_start = ram_start; - } /* * Give us at least 12 KiB of breathing room in case the device tree