From patchwork Wed Aug 21 10:58:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 820964 Delivered-To: patch@linaro.org Received: by 2002:adf:e98a:0:b0:367:895a:4699 with SMTP id h10csp640092wrm; Wed, 21 Aug 2024 04:01:24 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUl13G+l64iGEZpTf/zaxvvsWe8fG2X1WEDLw8n6112TscQhdtG+O3mEseZ/EKXxQkiTA6mmg==@linaro.org X-Google-Smtp-Source: AGHT+IHqB0CPEljY4vVqxoEbB79U0B76nSEpNwsSi6oCvRB4YGk61yeAJPSmR/er+a5jvcyXVNGq X-Received: by 2002:a17:907:e690:b0:a7a:a06b:eeca with SMTP id a640c23a62f3a-a866f124caamr162574666b.12.1724238084463; Wed, 21 Aug 2024 04:01:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724238084; cv=none; d=google.com; s=arc-20160816; b=ttPwke7oVIzrb4ncBkKm1MWIk1+CZvGyzlJrZdoUnsy8qHzZuQcT1v8PWjEeO1Iy/B 6mB5U/OD048Jn/ppFWvvIhJeAKKTk6kVSY0b4TxqhhS9rbzcnscEtjOfVqcPJyNK42bR CDeEGCS4GxWwIh8zEwgQe/pWg/IKj+akVRp+B6g2zXdDqmzOhD/hTVu94AOyGcm4EriD Tym8soRpqqiE8LTWGnTuT/rbLYVCXaLEBpgJjRePxwwVJyj2xgz9ZOQpmW3xt63U3tV7 h+Aj0LkYjXwIYPGp3SKpBYzWrX+B7FxLzIBg2W4QXkh072e0XXVoeKtZY0VF3ftqGrpL QwcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=WqjHTMgVACQqZbERTJmxRZNvMrPcYfdMHVxHn3wEJ9M=; fh=pnMZGD6unUPoMrkOwzXlkuYg+kVwGnSNRCTlQoWqjVc=; b=BnyX7/JOSLa37yvvXmOTkUv+bvzuaU+0RaKyhLVd1WTA472k06X841jxlaDv0unYVM jxQuh+I9g3ICyI0b/D39tgyswJpTibmqUogvGOJ2QTeJNiI6tjp0EGz25DbANVav9m9G Vx0N87Jrdg3lasHOOi/5UBBu5Qrir+xn3yVLtrZXZGSxFakLgSEKSEG9525ttWN0CLxJ EGbnPOgofNJdsuVhNQzImIp+L7laCd6Wug620bE/VSJjpOz5Nf73vgDvWg2rPoYgD8kH VQkaz+TpmHRSXejYJCy4j95pWvRyuVjQ79wfXA1nan+3iqW3FrY1ir5KAsmGmoT0cMCA 9knQ==; 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-a8680f3a9cesi24561566b.298.2024.08.21.04.01.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 04:01:24 -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 672B588C37; Wed, 21 Aug 2024 12:59:56 +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 09E0888DA4; Wed, 21 Aug 2024 12:59:55 +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_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, SPF_HELO_NONE,SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE 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 AEE0288DC2 for ; Wed, 21 Aug 2024 12:59:52 +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 40A63DA7; Wed, 21 Aug 2024 04:00:18 -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 CCFE33F73B; Wed, 21 Aug 2024 03:59:48 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Simon Glass , Tom Rini , Ilias Apalodimas , Heinrich Schuchardt , Marek Vasut , Mark Kettenis , Michal Simek , Patrick DELAUNAY , Patrice CHOTARD , Sughosh Ganu Subject: [PATCH v3 14/27] lmb: bootm: remove superfluous lmb stub functions Date: Wed, 21 Aug 2024 16:28:26 +0530 Message-Id: <20240821105839.2870293-15-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821105839.2870293-1-sughosh.ganu@linaro.org> References: <20240821105839.2870293-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 Remove a couple of superfluous LMB stub functions, and instead put a check for calling the lmb_reserve() function. Signed-off-by: Sughosh Ganu Reviewed-by: Simon Glass --- Changes since V2: None boot/bootm.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/boot/bootm.c b/boot/bootm.c index ddede08979..a61bbcfb45 100644 --- a/boot/bootm.c +++ b/boot/bootm.c @@ -239,11 +239,6 @@ static int boot_get_kernel(const char *addr_fit, struct bootm_headers *images, return 0; } -#if !CONFIG_IS_ENABLED(LMB) -#define lmb_reserve(base, size) -static inline void boot_start_lmb(void) { } -#endif - static int bootm_start(void) { memset((void *)&images, 0, sizeof(images)); @@ -700,7 +695,9 @@ static int bootm_load_os(struct bootm_headers *images, int boot_progress) images->os.end = relocated_addr + image_size; } - lmb_reserve(images->os.load, (load_end - images->os.load)); + if (CONFIG_IS_ENABLED(LMB)) + lmb_reserve(images->os.load, (load_end - images->os.load)); + return 0; }