From patchwork Sun Dec 8 10:52:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 848277 Delivered-To: patch@linaro.org Received: by 2002:a5d:50c2:0:b0:385:e875:8a9e with SMTP id f2csp1608682wrt; Sun, 8 Dec 2024 02:53:46 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXhMdH54iOzhV7I10zoqPcjJbtQGRIidFNpi6wuch8y0py9KO2RGlSBScqNO51c3iQ1sInKtA==@linaro.org X-Google-Smtp-Source: AGHT+IGRUDxBMHsSKBKhwQ3qqa1r2sT+k8QZ9HEnycTrTd/k4h1XhuVaj7LsBN3hx3mjPkYAm0OA X-Received: by 2002:a05:6402:5292:b0:5d0:d328:3a43 with SMTP id 4fb4d7f45d1cf-5d3bd66a55bmr9404933a12.6.1733655226034; Sun, 08 Dec 2024 02:53:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733655226; cv=none; d=google.com; s=arc-20240605; b=N5l6whNbZBA5Ml0o9mWT8RyLXLv8ThEtFemQpfu5x8mUG2goNmRomSH4iNAEolZ+kq V1WdYQZbDwPPl1JWh72BZjZGIBdk13w95WInSKtnYyqqAT0CJ64LaiYjHAS1XWaP4Tle uEZbnaVvmz6JMS4gWyLKbsGCZGcGuq+ERNCs6Dg6jHqV0UmaG8FHR6FheWauV6ca0sjR wMG4x0LJ6MstWixefrgoVkA1Y4jUaqXX9aIWFZye5VQy1vVfLjrn/DG7nu3nv6d+xcY0 vYyEnk8KI/EC899v427vGJTn/wqNgJrEua0/hjaFmAIMKV2gGaajQAV7t5t8EbULsAs8 EMwQ== 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=kRyP8CxyMSJR5NVN6FWTKtTSuN3cdpS5UQMXPY2mLgo=; fh=hZvqZBxbazJVHHmPuktPvsONT0CqPasY1orhqtz5Gjw=; b=Me2BGnRHw2T5Nc0pk/+6AGvXdgP3BXU0e6f7XSjHhzHvR6HsB/F4+Q4NaONqxuKBo2 nCJCh6q/3mUQsa+AzOyhtfU0XqQi1Z74BCjg9L/fbm2+WClt+/EGm/u/MF0XX4y755TZ YS5Xh6M2bUuz+am5OqRIiqfVfdOLfgZBLmvbMN5hZhtIjUG929l1QEueRR7HnmYtOIue hUvdraaJDfReHDh/MTS/YkxX/sSJ42cByNjGN/rsjpsIrhCgne8lDt8viHF8qQ3cv2Sw V1Cxrb+LXVfGbx3vNHP3ODDI57ziqHtiorGxrwKBZtUqXWjazzVi75XWz1CRyDKkiTT2 T+2A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B1cyFgE2; 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 4fb4d7f45d1cf-5d3c4ce5767si3390124a12.632.2024.12.08.02.53.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Dec 2024 02:53:46 -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=B1cyFgE2; 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 6C5668960F; Sun, 8 Dec 2024 11:53:07 +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="B1cyFgE2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 28ECF893BF; Sun, 8 Dec 2024 11:53:06 +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-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) (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 1F1FF895A9 for ; Sun, 8 Dec 2024 11:53:04 +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-ej1-x636.google.com with SMTP id a640c23a62f3a-aa560a65fd6so623284766b.0 for ; Sun, 08 Dec 2024 02:53:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733655183; x=1734259983; 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=kRyP8CxyMSJR5NVN6FWTKtTSuN3cdpS5UQMXPY2mLgo=; b=B1cyFgE26CjKpLPGufrlr6d46v9ZU27aj3mjFObPlZyVcWcSwD+t8SJXi6y3xYnNuw 58oqI2dZQPRO0mPhs6Na+Avsmw20TDDp4IljcpH59Y9XX60F404WGKHsoyQr8ObXF74k dGBpWqOKRSSNdZeu1d4GQ47o+VwNocmFgyk40IySP8ulKVYw113nuTFKBE5O23+RRpBp aUY+P3Xk9Zs4AOvdCrJYSoMLO444Sjl63sWevPW467/5ZueT02+ZHIBJc6gg2+4/zQ8i 2p5vhoK8z4kRQvKWrIpYevVHOai4DnQO3W1CRPRYCa3Dv1hr7HEu37+dCBaZTqZcQavl keiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733655183; x=1734259983; 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=kRyP8CxyMSJR5NVN6FWTKtTSuN3cdpS5UQMXPY2mLgo=; b=fdyz2bpIfBImnCWlQCa86YB5ios6mo4LkMJu7JbIBs5NCRkhNsV+qbJPLGtPdg+aTD oMsfbqwpSRvwWLEE5PVAVzUMgiEdGe6NWZxl6CSoQQLD8VRqfTQ5vvgL3rviH9QTyyrk +S/9QxKUnSQhzWc4mf3t5eqWJSGocsGF9/pMxg1SfL2Tq3NVkO1IYxPBTb8nCXGKrizm apwYIUMCpfgyZXD1VhU7i71Ry1k1tIw9sjOjyOMbe633qGlgNA7w8SDKRgbt0BxY15P0 IdD569EfUdqEaTDJGZ4O8grdkD7IXLfLb9sEkBQfmOaoj6RTBtg94i7aJncVpoKZ1Edd aQpg== X-Forwarded-Encrypted: i=1; AJvYcCXTXYmgaG3gPPCJCcvOBr0UPd268beYxPDNy2WSSiPMoknQ6BaJ98Id34rRVaFjaLmrNSZWGsk=@lists.denx.de X-Gm-Message-State: AOJu0YzsY7q1JH3KA9L6Mx3S5ejloHSwasBNbY2701qOwtwhVvjQvuFg rqzkGn5ETdY/BNTtPLqmI7cC9alWKfOxJ6Aa46vKr+rTMuEvxVrFLpoe5NCu6co= X-Gm-Gg: ASbGncs05Dfgvd12ORI6PcQZu1/c7Q5opQpG6NTRajUDYBjbn2LbCChzbts5jIw37Iq h6Od07ucahuJ/43/ejbXr9ynfEbeiI4VfvBRM/QYVFzd5IxhyQhxmrWWeN/hXa2zmTJyA7EOMf6 pOmeBGv1ZQ2VluVFeERsisBViMyK3w3Jj8V1OjdAlX8yM6yn5j+MFpxOLVmuH6tzt4l8/+ctgM9 wQ499qJiBh9hJpWsxfm4SQmJInudGmqFEdWzU21+5jyexI5tdgLv8yFNTNROR+RFY2gNfKNHRpD 9PWczKq3MppBfJxUbbcnFy8jm1s= X-Received: by 2002:a17:907:1c0c:b0:aa6:7867:a3d5 with SMTP id a640c23a62f3a-aa67867d7f6mr138170366b.29.1733655183593; Sun, 08 Dec 2024 02:53:03 -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.53.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Dec 2024 02:53:03 -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?= , Marek Vasut , Simon Glass , Sughosh Ganu , Mattijs Korpershoek , Peter Korsgaard , Roman Stratiienko , Laurent Pinchart , Matthias Schiffer , Dario Binacchi , AKASHI Takahiro , Mayuresh Chitale , Nam Cao , Janne Grunau , Caleb Connolly , u-boot@lists.denx.de Subject: [RFC PATCH 7/7] lmb: Rename _lmb_alloc_addr_flags() Date: Sun, 8 Dec 2024 12:52:10 +0200 Message-ID: <20241208105223.2821049-8-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 After all the cleanups of the previous patches there's not point anymore to define lmb_alloc_addr_flags() and _lmb_alloc_addr_flags(). Fix the incocistency of the flags type, which one function was definining as uintn and the other as an enum lmb_flags and rename _lmb_alloc_addr_flags() to lmb_alloc_addr_flags() Signed-off-by: Ilias Apalodimas --- include/lmb.h | 2 +- lib/lmb.c | 34 ++++++++++++++-------------------- 2 files changed, 15 insertions(+), 21 deletions(-) diff --git a/include/lmb.h b/include/lmb.h index a35a69d69f77..4f3c861b15a6 100644 --- a/include/lmb.h +++ b/include/lmb.h @@ -111,7 +111,7 @@ phys_addr_t lmb_alloc_base_flags(phys_size_t size, ulong align, * Return: base address on success, 0 on error */ phys_addr_t lmb_alloc_addr_flags(phys_addr_t base, phys_size_t size, - uint flags); + enum lmb_flags flags); /** * lmb_is_reserved_flags() - test if address is in reserved region with flag bits set diff --git a/lib/lmb.c b/lib/lmb.c index c09f1a1277ad..67bde60b74be 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -777,8 +777,20 @@ 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, - enum lmb_flags flags) +/** + * lmb_alloc_addr_flags() - Allocate specified memory address with specified attributes + * @base: Base Address requested + * @size: Size of the region requested + * @flags: Memory region attributes to be set + * + * Allocate a region of memory with the attributes specified through the + * parameter. The base parameter is used to specify the base address + * of the requested region. + * + * Return: base address on success, 0 on error + */ +phys_addr_t lmb_alloc_addr_flags(phys_addr_t base, phys_size_t size, + enum lmb_flags flags) { long rgn; struct lmb_region *lmb_memory = lmb.available_mem.data; @@ -802,24 +814,6 @@ static phys_addr_t _lmb_alloc_addr(phys_addr_t base, phys_size_t size, return 0; } -/** - * lmb_alloc_addr_flags() - Allocate specified memory address with specified attributes - * @base: Base Address requested - * @size: Size of the region requested - * @flags: Memory region attributes to be set - * - * Allocate a region of memory with the attributes specified through the - * parameter. The base parameter is used to specify the base address - * of the requested region. - * - * Return: base address on success, 0 on error - */ -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 number of bytes from a given address that are free */ phys_size_t lmb_get_free_size(phys_addr_t addr) {