diff mbox series

[v2,05/32] lmb: use the BIT macro for lmb flags

Message ID 20240814110009.45310-6-sughosh.ganu@linaro.org
State Superseded
Headers show
Series Make LMB memory map global and persistent | expand

Commit Message

Sughosh Ganu Aug. 14, 2024, 10:59 a.m. UTC
Use the BIT macro for assigning values to the LMB flags instead of
assigning random values to them.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
---
Changes since V1: None

 include/lmb.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Simon Glass Aug. 15, 2024, 8:31 p.m. UTC | #1
On Wed, 14 Aug 2024 at 05:00, Sughosh Ganu <sughosh.ganu@linaro.org> wrote:
>
> Use the BIT macro for assigning values to the LMB flags instead of
> assigning random values to them.
>
> Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
> ---
> Changes since V1: None
>
>  include/lmb.h | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>

Reviewed-by: Simon Glass <sjg@chromium.org>
Ilias Apalodimas Aug. 26, 2024, 10:31 a.m. UTC | #2
On Wed, 14 Aug 2024 at 14:00, Sughosh Ganu <sughosh.ganu@linaro.org> wrote:
>
> Use the BIT macro for assigning values to the LMB flags instead of
> assigning random values to them.
>
> Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
> ---
> Changes since V1: None
>
>  include/lmb.h | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/include/lmb.h b/include/lmb.h
> index 7b87181b9e..a1de18c3cb 100644
> --- a/include/lmb.h
> +++ b/include/lmb.h
> @@ -5,6 +5,7 @@
>
>  #include <asm/types.h>
>  #include <asm/u-boot.h>
> +#include <linux/bitops.h>
>
>  /*
>   * Logical memory blocks.
> @@ -18,8 +19,8 @@
>   * @LMB_NOMAP: don't add to mmu configuration
>   */
>  enum lmb_flags {
> -       LMB_NONE                = 0x0,
> -       LMB_NOMAP               = 0x4,
> +       LMB_NONE                = BIT(0),
> +       LMB_NOMAP               = BIT(1),
>  };
>
>  /**
> --
> 2.34.1
>

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
diff mbox series

Patch

diff --git a/include/lmb.h b/include/lmb.h
index 7b87181b9e..a1de18c3cb 100644
--- a/include/lmb.h
+++ b/include/lmb.h
@@ -5,6 +5,7 @@ 
 
 #include <asm/types.h>
 #include <asm/u-boot.h>
+#include <linux/bitops.h>
 
 /*
  * Logical memory blocks.
@@ -18,8 +19,8 @@ 
  * @LMB_NOMAP: don't add to mmu configuration
  */
 enum lmb_flags {
-	LMB_NONE		= 0x0,
-	LMB_NOMAP		= 0x4,
+	LMB_NONE		= BIT(0),
+	LMB_NOMAP		= BIT(1),
 };
 
 /**