From patchwork Tue Oct 15 15:37:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 835459 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c8f:0:b0:37d:45d0:187 with SMTP id z15csp301708wrs; Tue, 15 Oct 2024 08:40:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV5fHIRUxKdxjHip+MJFTT5s1KSeJerOtmUd3hYEslnJsxXk/Er+m69ZgsJB3z910tuL0+KEw==@linaro.org X-Google-Smtp-Source: AGHT+IFVhpbKByfVyVx2CRPjJk7hmy3zttQlFQc3MdO8qFi0FXx7WnQ7WICilAElb8yEYhBVjTC0 X-Received: by 2002:a05:6602:3426:b0:82c:ee6d:a7ee with SMTP id ca18e2360f4ac-83a64cb6568mr698647639f.2.1729006819476; Tue, 15 Oct 2024 08:40:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729006819; cv=none; d=google.com; s=arc-20240605; b=hexR1FdTNDHZHKxtH542i+wAXGj+zYvcoi25JJrEUB/hIGDZkD0EEwrpP0hI0RAjqq RZhmw7eLbVe3Ai+b1W4h9wht/2P2Npp6EBlCFaHClzgIRkA3luIB9lpCY3zfOLlHznPR OfgubK+f6VzJXZ7tFoKF0cghZ34M997GPkBJCpwKphUi7/G34GMBgE1CGDJblu6mgqJz CapaMIh+4LWUjpoaGIa5CaEiTyWjrUlxrX3YsOyAVE6E9nJjN/DnRVWeIwJn2bNtfv2A 1n88BunSS36Zsc2/CK1faY7kqFTHWbI3lsFr0iN9Die78cRvKmCZgo+KeLiH1xLNe+lI SEPg== 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=P/OASq2S24YQW1CoLpDopPBQYjdgCALbONzwtlnvCoY=; fh=MYvlzMqd61VHJORtkCu1tTA+qP9jRMJFkVEqSzDEdy8=; b=hUZc2XuobVpPYUTnqXaahmIKBAbeXJJGRtxRVjTSX0cRaoAI4VsD7XLxItzEQWHiXu r4ou9K0wZDkbehCks6h1pI70O+3MbMqqT9m8IAGz0mpf7Xkj+GSEUetUEk5tTen3GJ+i RfzTRqfeYSUY5pCWa3g/ODSVDijGHMJWdaQplbOEmnO91IcwGZe1HBL/TyH3O6hY+4Oz lIsFJLrSJ/txk4MwPACNSvSUt5lKyukh2sJeusK4Syzk7vHfCSITK/ZI3UZWW9szw9/y igFp49TV1iN2ohlSX87T3/HfGiYwud63pcniL92nxZrL4rww9GZobklc1bY2klsQ+6TQ P7ug==; 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 8926c6da1cb9f-4dbecd0bbdbsi729784173.191.2024.10.15.08.40.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2024 08:40:19 -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 29FF988D5C; Tue, 15 Oct 2024 17:38:33 +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 19E9E88730; Tue, 15 Oct 2024 17:38:32 +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_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_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 E4E2288D97 for ; Tue, 15 Oct 2024 17:38:29 +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 F27B7175D; Tue, 15 Oct 2024 08:38:58 -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 7FD7B3F528; Tue, 15 Oct 2024 08:38:26 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Heinrich Schuchardt , Simon Glass , Tom Rini , Caleb Connolly , Jonas Karlman , Mark Kettenis , Sughosh Ganu Subject: [PATCH v4 15/15] lmb: replace the double-underscore with single-underscore for all functions Date: Tue, 15 Oct 2024 21:07:17 +0530 Message-Id: <20241015153717.401371-16-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241015153717.401371-1-sughosh.ganu@linaro.org> References: <20241015153717.401371-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 A bunch of static functions in the LMB module have used a double-undersore for the function names. It was suggested to use a single-underscore instead, as the double-underscore is usually used by library functions. Replace the double-underscore with single-underscore for all functions. Signed-off-by: Sughosh Ganu Suggested-by: Simon Glass --- Changes since V3: None lib/lmb.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/lmb.c b/lib/lmb.c index f3a1d8ca256..78fe2d4de7c 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -496,7 +496,7 @@ long lmb_add(phys_addr_t base, phys_size_t size) return 0; } -static long __lmb_free(phys_addr_t base, phys_size_t size) +static long _lmb_free(phys_addr_t base, phys_size_t size) { struct lmb_region *rgn; struct alist *lmb_rgn_lst = &lmb.used_mem; @@ -562,7 +562,7 @@ long lmb_free_flags(phys_addr_t base, phys_size_t size, { long ret; - ret = __lmb_free(base, size); + ret = _lmb_free(base, size); if (ret < 0) return ret; @@ -618,7 +618,7 @@ static phys_addr_t lmb_align_down(phys_addr_t addr, phys_size_t size) return addr & ~(size - 1); } -static phys_addr_t __lmb_alloc_base(phys_size_t size, ulong align, +static phys_addr_t _lmb_alloc_base(phys_size_t size, ulong align, phys_addr_t max_addr, enum lmb_flags flags) { u8 op; @@ -692,15 +692,15 @@ phys_addr_t lmb_alloc(phys_size_t size, ulong align) */ phys_addr_t lmb_alloc_flags(phys_size_t size, ulong align, uint flags) { - return __lmb_alloc_base(size, align, LMB_ALLOC_ANYWHERE, - flags); + return _lmb_alloc_base(size, align, LMB_ALLOC_ANYWHERE, + flags); } phys_addr_t lmb_alloc_base(phys_size_t size, ulong align, phys_addr_t max_addr) { phys_addr_t alloc; - alloc = __lmb_alloc_base(size, align, max_addr, LMB_NONE); + alloc = _lmb_alloc_base(size, align, max_addr, LMB_NONE); if (alloc == 0) printf("ERROR: Failed to allocate 0x%lx bytes below 0x%lx.\n", @@ -727,7 +727,7 @@ phys_addr_t lmb_alloc_base_flags(phys_size_t size, ulong align, { phys_addr_t alloc; - alloc = __lmb_alloc_base(size, align, max_addr, flags); + alloc = _lmb_alloc_base(size, align, max_addr, flags); if (alloc == 0) printf("ERROR: Failed to allocate 0x%lx bytes below 0x%lx.\n", @@ -736,7 +736,7 @@ phys_addr_t lmb_alloc_base_flags(phys_size_t size, ulong align, return alloc; } -static phys_addr_t __lmb_alloc_addr(phys_addr_t base, phys_size_t size, +static phys_addr_t _lmb_alloc_addr(phys_addr_t base, phys_size_t size, enum lmb_flags flags) { long rgn; @@ -767,7 +767,7 @@ static phys_addr_t __lmb_alloc_addr(phys_addr_t base, phys_size_t size, */ phys_addr_t lmb_alloc_addr(phys_addr_t base, phys_size_t size) { - return __lmb_alloc_addr(base, size, LMB_NONE); + return _lmb_alloc_addr(base, size, LMB_NONE); } /** @@ -785,7 +785,7 @@ phys_addr_t lmb_alloc_addr(phys_addr_t base, phys_size_t size) phys_addr_t lmb_alloc_addr_flags(phys_addr_t base, phys_size_t size, uint flags) { - return __lmb_alloc_addr(base, size, flags); + return _lmb_alloc_addr(base, size, flags); } /* Return number of bytes from a given address that are free */