From patchwork Sun Dec 8 10:52:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 848274 Delivered-To: patch@linaro.org Received: by 2002:a5d:50c2:0:b0:385:e875:8a9e with SMTP id f2csp1608568wrt; Sun, 8 Dec 2024 02:53:20 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVHsKtzUfkoerKlCPirIHONvdxKPO46hja+8flgVOurvoB0h0hGGFTuRFCkpgAjI+xDWIaARA==@linaro.org X-Google-Smtp-Source: AGHT+IE+HvONbCjxDsTYUHPWKMwlT5Zdq0N9kZfRU23MJVBeV/0KNxWEbIuXdbwp1uEB188Myypg X-Received: by 2002:a17:906:308d:b0:aa6:7c36:342d with SMTP id a640c23a62f3a-aa67c36351dmr124505566b.3.1733655200145; Sun, 08 Dec 2024 02:53:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733655200; cv=none; d=google.com; s=arc-20240605; b=abmkmqQx1Wj3MEczxShASnMRkJkT9MvomrQfICv573/RDdws1Tx+wwoQYV/1zY5Vo4 jbdY3VwoJVnUq5Xz+pE7CVJMowbCA92YHOKFTfq3HRSb1rTB2dfuv6i+NwSpnHmRHC8/ 6qKQtaHZ35J63CEMMn9ssoGpyRKR2yHG6KAxEnGSbDoAZAYzwN2w4SuXIBGO/aXfXVGI Y6u7yUcVJX8MB4m7CkdVBITOjhjmyOU4pCQEY/Pv6aKm3pvtyWb6I0bUl47rJoHfeqC9 tdJXC4n8G4yj5wY3z0iYkxEzWrj9zWg95xsT7GE+1v8A8Op9xN2x5BCqLAtcfzIkCQ7y Vxtg== 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:dkim-signature; bh=pAmvCUSXW6aB30F7BDwm6ua6DD8so9h99thLaEi5j+U=; fh=J0A5L2PCLN29undsJV7F9P+YDI6KZiWPqds4bfj4qNw=; b=lCjucI9p/TXuczPn38U15sEhTQ0CsfA7uUlyEeERqa9GXn7YVhORtJAqj1nu2jKAD0 brba6mZzqHuZsVw6OfG61XPdEFLZ/GDh8HsE3BxFs6nIB4ltoWO/XajSRoQPofsDvOSl nXpRWJuxClqGjhOwj4vMVZe/1+c/SQvi12Jq/vy6/vQXdcwl1Z4B1CqQJruAyDnHcs7N r6W7bnWPFV3RAGx865cHY4yAV2YsD0yXNYzO3gPYZlGgcipjFvLuA+xYJuuCr0uH7BWe KWRnNmv5XHHyCCNz+Qs5RC4xBrsPJl45tNTE98ScQG63hDvg2F0KK/Oxvl8W88XRWaIi e3Qw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fUU7oL0s; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id a640c23a62f3a-aa625ed84a3si525174566b.33.2024.12.08.02.53.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Dec 2024 02:53:20 -0800 (PST) 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; dkim=pass header.i=@linaro.org header.s=google header.b=fUU7oL0s; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 337D8895C2; Sun, 8 Dec 2024 11:52:56 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="fUU7oL0s"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 05BDF895A1; Sun, 8 Dec 2024 11:52:55 +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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0806B89589 for ; Sun, 8 Dec 2024 11:52:53 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-5cf6f804233so4160927a12.2 for ; Sun, 08 Dec 2024 02:52:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733655172; x=1734259972; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pAmvCUSXW6aB30F7BDwm6ua6DD8so9h99thLaEi5j+U=; b=fUU7oL0sz9UBeYYfL/ebLK4avQvYKGBH/WVzDTfS+Sb9Incp7mN9cfVWnECLSny/Fn yAlZZwo96LwWwcR707QYVQjlRmazrBPosYActwUyk4p/BKdY7lMi21jRpb4lvK2yCu+e BCE5uZKlChflM5rcCfByZsDu/Vgofwcra/s1iEKBM/AbkNHadhnd0Bg/qfVWp7JJnrMq sTcl2kNZ4yHaUOOwJ9z941yyFGZg1+qTXrw0YzNL4zarkxHDICCcC522JrCmVEdfjqtL JiYyctp88pX/mNzFD61D31yixGfoM2oBq/jcg1jwDlIaprPQZ+JoiqavD8kPBoPtL4co 3Qlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733655172; x=1734259972; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pAmvCUSXW6aB30F7BDwm6ua6DD8so9h99thLaEi5j+U=; b=MhfU9JVzu/xpuHEYU2xvzkhy8Bw6g9UCcCw/LGHNa6Qzm8wG/WovFZ2CA4cW44NQR3 8abGSZH5Xoxw6LqwSqV+uMQWSEsmL4Nck7GZUDCEkKokK/jVi1FXFe13M6Qn1PF7NVil 8hz3EN1xnetkmDmV9CVKbYQFvLwYUSCfD8XrHTRaejnUf+qkVzBM5UPdDBIOab05gbUZ TVp5rPlet0GAV6idr00A8o6VhmiyjUbyA5CuuRv+SZwF/dErgfksT2d8HUeUQD6+PbJQ Y8vPlXH0Q86w7KzT0oXLXryF8NgLv/CDc/+eZ42mpZw9jLpVIPA/JQMZRo9u4yan0qLJ aKoA== X-Forwarded-Encrypted: i=1; AJvYcCUpMIABAb1ClciX2jLzc12SnDlfrMan7GXa9bkvAlKd562nABthyeG9gI4tvpm8YJsKmmIodak=@lists.denx.de X-Gm-Message-State: AOJu0Yza2PcArNDhhy/nkR5L/x3JoS5ZvVHXU+PN3x3yh7FJQQokuugl 6q/TVYyZc8BLNEW09s0sYOVoDU4DikEBNFYCQ5FF+S703PsCKpe5FFkpuSvLQa4= X-Gm-Gg: ASbGncsqmxynAlz/1c0RYypM37vtreilSH6quTRr7W20xiCHRJPI1Dt1xtHO8Y1igFg HPpPNx8pLddk7C9zekVlMcmgpFwIG1nUZ+BH4NS/y4Lht6O3Bj7QHWoUSKaJDq+j10WmxRkmuqh DQcQMFY5ZcdSyacwI47E1tFaHiHGiLg/ePy1Qvj8CG5r7tvsjsbeTpoEA1UUFgkwod6KWLkNKO5 +NOB2jvLtHaavDOcFiIdsaunhZ3d5kqIMDT/yxZviXQhCWOjrm0f0N/1KY+xUHgZOcfwa2t7oEg UUyR3aGfvxDT6QXwdbtfJfXVxQg= X-Received: by 2002:a17:906:3d21:b0:aa5:44a8:9ae7 with SMTP id a640c23a62f3a-aa63a20ecb6mr886366466b.47.1733655172489; Sun, 08 Dec 2024 02:52:52 -0800 (PST) Received: from localhost.localdomain (ppp176092181030.access.hol.gr. [176.92.181.30]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aa625e92fe3sm517768566b.51.2024.12.08.02.52.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Dec 2024 02:52:52 -0800 (PST) From: Ilias Apalodimas To: xypron.glpk@gmx.de, trini@konsulko.com Cc: Ilias Apalodimas , =?utf-8?q?Marek_Beh?= =?utf-8?q?=C3=BAn?= , Sughosh Ganu , Marek Vasut , Simon Glass , Mattijs Korpershoek , Peter Korsgaard , Roman Stratiienko , Laurent Pinchart , Matthias Schiffer , Dario Binacchi , Nam Cao , Mayuresh Chitale , AKASHI Takahiro , Janne Grunau , Caleb Connolly , u-boot@lists.denx.de Subject: [RFC PATCH 4/7] lmb: Remove lmb_add_region() Date: Sun, 8 Dec 2024 12:52:07 +0200 Message-ID: <20241208105223.2821049-5-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241208105223.2821049-1-ilias.apalodimas@linaro.org> References: <20241208105223.2821049-1-ilias.apalodimas@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's no point defining a function that's called only once just to avoid passing the flags. Remove the wrapper and just call lmb_add_region_flags(). Signed-off-by: Ilias Apalodimas Reviewed-by: Heinrich Schuchardt Acked-by: Sughosh Ganu --- lib/lmb.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/lmb.c b/lib/lmb.c index ffdd23d87b9b..56e005308dde 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -640,19 +640,13 @@ void lmb_add_memory(void) } } -static long lmb_add_region(struct alist *lmb_rgn_lst, phys_addr_t base, - phys_size_t size) -{ - return lmb_add_region_flags(lmb_rgn_lst, base, size, LMB_NONE); -} - /* This routine may be called with relocation disabled. */ long lmb_add(phys_addr_t base, phys_size_t size) { long ret; struct alist *lmb_rgn_lst = &lmb.available_mem; - ret = lmb_add_region(lmb_rgn_lst, base, size); + ret = lmb_add_region_flags(lmb_rgn_lst, base, size, LMB_NONE); if (ret) return ret;