From patchwork Wed Aug 14 10:59:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 819119 Delivered-To: patch@linaro.org Received: by 2002:adf:cd01:0:b0:367:895a:4699 with SMTP id w1csp645582wrm; Wed, 14 Aug 2024 04:03:35 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXzSKIdTq//GvoMLe6VZ+boV6I7z1q+2YhPl1k7fFuT23tZlOYygnD2QFQZ1MX1KyhqI8+gsDo7glhPCVq7wM8a X-Google-Smtp-Source: AGHT+IHiFHlguHCui+Inerkgczx5VbjauooEzQh6JCsBk1lJaQdo9eo15jTvMgCR2Rfu0Ez+pJdR X-Received: by 2002:a17:907:e686:b0:a7a:bc34:a4c0 with SMTP id a640c23a62f3a-a8367017958mr140419766b.45.1723633415621; Wed, 14 Aug 2024 04:03:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723633415; cv=none; d=google.com; s=arc-20160816; b=F6GvB5qX7hu6aikovi/RWdMpPhlY8NMyqfQ6aOmK8ewWmBtswV5sBZc9L7gMT7aNln yqPKk/GrzpBFsLUqaGUF+i/RGbR+0PycYsJGj494nReTOTVbiUrNrMp50Wb2yVPzW+PN 362JaAR5lztWEUwJoRr4BlH64i4zbhb60X60MP/gjlYAhYaXBqo37V0Cu8Dd0Mdhr61k IrFIMeb03vWXIgSjsdes//9J/6J3KGx3rIB5w6TpS8corxyYnK7he8xUdl08KgO+qxX6 PwfbzPGFS2YfENf8coB99fXGxoWv3Z8a9pZlJNGd+a1TZfLVjS2Qrn/sJZQQ9XHOT7jc KS3w== 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=Mi2eIpS5RI9CPihbuR4G/LtCvKoD9FQCLtDXA+6JLHA=; fh=w4WyT9xL7ErtT1TeetrD/m0Y0mAgjnERgxacGUpGjSg=; b=b+tFslfpFCFp9SjRB+juXhTBhkkGwFjmRN5i+HE4Vhir2mDSgWa+zi22DYs5Fh1cwE MH9Xw2bKnssEFGqk/mfcRdfWmfXwcXk71EUK+sVjWnlkkHKoNgHe5vAogRx8nEQXrdDr xKVKiBy0mj20scfJ2LIE1CMaOFI4U/hzzLBCep4DrQt4w2r6TVs+3rQj69c2BoobHrim pHnXFi9TKArXc4+a4TUlMs/vQwHaB2w6SEzxh5ybcYqqdJV4WeBLbhrDEWAD3cD9j/fc DGYjdEz+BkuPPjXE81aImcsKizJftDGOBin787ZEOHQy9ksGnTmItPgBY+9FXDHmUgGa RVoA==; 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-a80f4187b6fsi198048766b.855.2024.08.14.04.03.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 04:03:35 -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 99723882E6; Wed, 14 Aug 2024 13:01: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 8043A882E6; Wed, 14 Aug 2024 13:01: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 7EDB388A08 for ; Wed, 14 Aug 2024 13:01:53 +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 E3BA4DA7; Wed, 14 Aug 2024 04:02: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 700A53F58B; Wed, 14 Aug 2024 04:01:48 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Heinrich Schuchardt , Simon Glass , Marek Vasut , Tom Rini , Mark Kettenis , Michal Simek , Patrick DELAUNAY , Patrice CHOTARD , Huan Wang , Angelo Dureghello , Daniel Schwierzeck , Thomas Chou , Rick Chen , Max Filippov , Sughosh Ganu Subject: [PATCH v2 16/32] lmb: bootm: remove superfluous lmb stub functions Date: Wed, 14 Aug 2024 16:29:53 +0530 Message-Id: <20240814110009.45310-17-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240814110009.45310-1-sughosh.ganu@linaro.org> References: <20240814110009.45310-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 V1: 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; }