From patchwork Thu May 1 12:02:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 886334 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp278737wrq; Thu, 1 May 2025 05:03:28 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV6OH8TEmbJSB+ms1zsm9u3KwyfhVgI7h3UnVzPJEAOzx7xO41klGzMn95SORl6hjQIaovp+w==@linaro.org X-Google-Smtp-Source: AGHT+IFscUWEZ4RQ61jVg4VQNONT2NOjIMZLAKeWW8MyN46pWiJRaH9NVRW7tQA35n1XZU/5BBY5 X-Received: by 2002:a05:6000:4312:b0:3a0:7a7c:2648 with SMTP id ffacd0b85a97d-3a08ff3bd3fmr5159637f8f.27.1746101008555; Thu, 01 May 2025 05:03:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746101008; cv=none; d=google.com; s=arc-20240605; b=ZrJ/mjs/MW8U5kccNPHIP//3asaJf3kc0/gBdLVldMPxyDG862ZRpaM2zYFiVfwcgL +/MkTd1leIkJS5zXl6ENkeQzd35KYXdxpvUWRvN/eM99PppOwfZ3FpXeVylqOucbdGdd jVUugUL+scSxjF+dYIFCUmqLcBR/Al2L9gtiJw2OX1Enc7R3pVBbePFJRPQCV7dcLLmq 9YRvEZHpdJX4aXrqoTl8a2fdbq5h/IcL0uRMwrYezpvuE5T3H9VreOeSGwljgQcBm3OG 1U/LJF6NBFC4pROW7oNaG/XO0dsfxKXy4fxNdUFkifuBR5iuI38NX+Lb9mIF0c19o4yo LNOg== 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=+ibEXrlUPiOqyZS9GePyLNLCH4c907Lfr1pMTaKCGqw=; fh=OQsgrM7lYcbKid/8QRKDrRnr3aZuZ+FGeYy6ua/5St0=; b=Z3ki49ujoifPm8W7BhbstbSjTx00pvCW0ZhJUcxpUedOyAyPTZROc3lbDoYvExJrk/ vKZMQNzJanhmvoZz6PXEOz1115GCzM8BxfKZVNSK4pGt//ead0QcfmOoe56q0K3XOnwy gBl3V7w1qa/kIjUnM3W6WGHpd8HA3oUXxf1novh12qtCzEMcMxWhwv6Rdrt4RuLaMKAC Ic6wVXTzfABIlG+g26uHrHmyxU5mHfB4u9I5Bb4WYH99bvG7PYoBliVIQL/TTn91/LRd RClx+W/B1jZScdrAq03NuJPZ/Y+mxg59aNKXi/rWPG23M70ZS86xv/eZdVWCmSXVADg8 JFAw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id 5b1f17b1804b1-441b89cc586si5044505e9.4.2025.05.01.05.03.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 May 2025 05:03:28 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 1EC4880FDE; Thu, 1 May 2025 14:03:12 +0200 (CEST) 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 0D3138056A; Thu, 1 May 2025 14:03:11 +0200 (CEST) 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 D6D65820EB for ; Thu, 1 May 2025 14:03:08 +0200 (CEST) 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 BD80F1CE0; Thu, 1 May 2025 05:03: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 7C3563F673; Thu, 1 May 2025 05:03:05 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Tom Rini , Casey Connolly , Neil Armstrong , Mark Kettenis , Weijie Gao , Heinrich Schuchardt , Simon Glass , Sughosh Ganu Subject: [PATCH 3/5] lmb: staticise lmb_add_memory() Date: Thu, 1 May 2025 17:32:37 +0530 Message-Id: <20250501120239.199829-4-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250501120239.199829-1-sughosh.ganu@linaro.org> References: <20250501120239.199829-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 lmb_add_memory() is only called from the lmb module. Mark the function as static. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas --- include/lmb.h | 8 -------- lib/lmb.c | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/include/lmb.h b/include/lmb.h index be723d9162a..73df4e07248 100644 --- a/include/lmb.h +++ b/include/lmb.h @@ -120,14 +120,6 @@ int lmb_allocate_mem(enum lmb_mem_type type, u64 align, phys_addr_t *addr, */ int lmb_init(void); -/** - * lmb_add_memory() - Add memory range for LMB allocations. - * - * Add the entire available memory range to the pool of memory that - * can be used by the LMB module for allocations. - */ -void lmb_add_memory(void); - long lmb_add(phys_addr_t base, phys_size_t size); phys_size_t lmb_get_free_size(phys_addr_t addr); diff --git a/lib/lmb.c b/lib/lmb.c index a21f9c72204..55aca306a90 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -605,7 +605,7 @@ static __maybe_unused void lmb_reserve_common_spl(void) } } -void lmb_add_memory(void) +static void lmb_add_memory(void) { int i; phys_addr_t bank_end;