From patchwork Wed Mar 12 08:54:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 872818 Delivered-To: patch@linaro.org Received: by 2002:a5d:64e7:0:b0:38f:210b:807b with SMTP id g7csp158505wri; Wed, 12 Mar 2025 01:55:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW6CoQi5YiUXpsVomwKQCRM6tmqGr28GX/sHminXBUvkzjc74eYrJ+JO4cJAjZHZeWZtipVaA==@linaro.org X-Google-Smtp-Source: AGHT+IHUY/MsTrgjTAV+2jxB0EUbqsKBlvKl1ktp08YUKkT1PCjciHf0qoaVV+UwsXAnQEhR3mVa X-Received: by 2002:a05:690c:3384:b0:6fd:485c:9dd4 with SMTP id 00721157ae682-6febf3e06abmr294787157b3.32.1741769702091; Wed, 12 Mar 2025 01:55:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1741769702; cv=none; d=google.com; s=arc-20240605; b=BxhlCzuqJG0UjklVTXwVkmxDDKtOi5oz1kCaLaIah9cLrj8+O6cUShKlJDFNDdSU8E l42vGA9Q5WQ0Atu7do1DKfywHIoashAktV0aq1eV442xoVeumBO0GOff8OwqvW4YMmeY OO+kLiA7Kpu3qghJe5Vdc+y3PXTjcMmq/PEAKOY+zYNSb4uxll/0chZnGBbL96RCPmsI WTDbGZwBt5BUWt0sslo+L4qRxeuOylewjHhz3smhT/ZGG2EXGbdbJfv+Q7W3XQGOSOJu hNd9SlT2KxLwbGfh/esNz7Me6IFVzmxy2yENVgNAWaCJR25Auh4lQ5l5IaoBq3LM7Y+Z 1fHA== 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=V+zbAAi6hQmW/Woy+Hy7CXUWrIzZ12DjcG4NyvPX5oQ=; fh=Evn5eBx2ytD/hj+tB8Xv1T61prWYrP0E59LRKWAPORI=; b=JGXIfsin+FkeZ0+RvFogu4NE2oyYHs5Gv9Hz7rbRlQ10DeKlr7Rg+UdD7Hops+7LDN UC7cMteXWG2PTsFDVqyx3q/ldI2S46ATPIL3v/Vgh2vPKjiu9YauY75O94qNnIvbFX6F inXlcynF/1Kzk/mjuew720+4nP1EFHTCIy9OisorVHvgaEU3VjXOBiwnDaCmUEcFgbxD 0/ZqqJChhUp2aqxU61NeracCO9WtIoQbXm2p3ORZZQvT5xvT6AHMfGGoYNOplCpg2dRZ UArVjAKRoJKSwe+cy1kj3HZ+yW7WdxW8L8vu80aU+HLiWQxGxPXFpne5AMnOda2wlYPE Ct+w==; 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 00721157ae682-6fecd2a091fsi83481597b3.184.2025.03.12.01.55.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Mar 2025 01:55:02 -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 8BF66817A5; Wed, 12 Mar 2025 09:54:53 +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 CB802801FB; Wed, 12 Mar 2025 09:54:52 +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 4B25980FB9 for ; Wed, 12 Mar 2025 09:54:50 +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 55C07152B; Wed, 12 Mar 2025 01:55:00 -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 F2AF23F5A1; Wed, 12 Mar 2025 01:54:46 -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 v8 1/8] efi_loader: remove unused code from copy_fdt() Date: Wed, 12 Mar 2025 14:24:17 +0530 Message-Id: <20250312085424.1201148-2-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250312085424.1201148-1-sughosh.ganu@linaro.org> References: <20250312085424.1201148-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 V7: 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