From patchwork Thu Jul 4 07:35:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 809930 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp1043141wru; Thu, 4 Jul 2024 00:40:30 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUQqObzKIIpieRo8LRyU0z7ZIAUjCwxVmeOynKrMQwBdT7Wj9ny/ZBQ9C74zDCERy9FllbofHftohL9ahJQd2W5 X-Google-Smtp-Source: AGHT+IHxYWXFXHa5Lqvm2oyARmVfvZE3AwIufgNkeycdyFfm9tHMzRrLK9aWF45xk50IkQ6qnmqy X-Received: by 2002:a17:907:3f1d:b0:a76:ca8d:36fb with SMTP id a640c23a62f3a-a77ba455643mr68256666b.12.1720078830606; Thu, 04 Jul 2024 00:40:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720078830; cv=none; d=google.com; s=arc-20160816; b=xtLLi1uJ3QRgY/FIaWicBcft8RIURkCjzyPJmsLG2Qpa9OXf+WipXqzgCuu72engNy fMAnsYn+u0teRokhyTW8QkpQOFwyatlxNjisNiZ7TkHC4ltjaX9WLd8yh7lh7KAcBtaP JFv7RvDhNqiLFoY7Mc1EFbLVUAnMfdaDEv0yWNoxpnhMAJW5Ul0BVr7GL4YtpHgWoOTx JfLvgQ0DDPz6NEx427+c8bRAro/fibONNoDHIHL3BCt7aDxhUXrPLrBODqydTHikXn4w 4is8yknzQLgRTXrhPvkrG5lLfLew0yJR/wXaMSGsWZlAF2ayHuCzFX5BDTTpAA6nNKLs IA0Q== 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=Qgvf8jzquUu4zpCSC8OyHrZZceQWElZmUoj3vNGYZk0=; fh=ez1zzjhC0XWyqTp7tWutqrA/nFdALDnQKrnQnXYhk5Q=; b=wahkyPhz6nHO440NV2dXOEGvnelX341jq644bIk5smuiqAKTU8qiU5/SuhJ+zSjTCX VOiipMmi2MS5i2gpjKmPS3yiQmzVO6UyhiTQM8UUaCbX5aXsDVYTQGX5iXLJI1OI5Vod XbJ/3/sEJR+VnrTwRi6yQTs0UbiIoZ9XsTB/QBf0C2J21EoT1/w3KiMoB9l1S+mgf10B 7vF7ZjdTmX7OCaGJRjtxwmyW38rDJ3GIPSeT/BO/nihvJwv8q8uB2fXsEZrUzHfCH8LR eVq6gGVyOzOXurdZcS7oIPv2m7qGRJU0glcs19ZIZygwxszDFfc3KWFrOUKGT4BH+TP+ gccw==; 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-a751e856157si437346766b.766.2024.07.04.00.40.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jul 2024 00:40:30 -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 032DA88934; Thu, 4 Jul 2024 09:37: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 658C788927; Thu, 4 Jul 2024 09:37:31 +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 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 6AD1E88926 for ; Thu, 4 Jul 2024 09:37: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 EC1F3367; Thu, 4 Jul 2024 00:37:53 -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 C5BD13F762; Thu, 4 Jul 2024 00:37:25 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Tom Rini , Ilias Apalodimas , Heinrich Schuchardt , Simon Glass , Marek Vasut , Mark Kettenis , Fabio Estevam , Michal Simek , Sughosh Ganu Subject: [RFC PATCH v2 23/48] lmb: use the BIT macro for lmb flags Date: Thu, 4 Jul 2024 13:05:19 +0530 Message-Id: <20240704073544.670249-24-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240704073544.670249-1-sughosh.ganu@linaro.org> References: <20240704073544.670249-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 Use the BIT macro for assigning values to the LMB flags instead of assigning random values to them. Signed-off-by: Sughosh Ganu --- Changes since V1: New patch based on review comment from Heinrich include/lmb.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/lmb.h b/include/lmb.h index 02891a14be..cc4cf9f3c8 100644 --- a/include/lmb.h +++ b/include/lmb.h @@ -5,6 +5,7 @@ #include #include +#include /* * Logical memory blocks. @@ -18,9 +19,9 @@ * @LMB_NOMAP: don't add to mmu configuration */ enum lmb_flags { - LMB_NONE = 0x0, - LMB_NOMAP = 0x4, - LMB_NOOVERWRITE = 0x8, + LMB_NONE = BIT(0), + LMB_NOMAP = BIT(1), + LMB_NOOVERWRITE = BIT(2), }; /**