diff mbox series

[3/6] lmb: Make const flag_str[] in lmb_print_region_flags() more const

Message ID 20241208002121.31887-4-semen.protsenko@linaro.org
State Superseded
Headers show
Series lmb: Fix reserving the same region multiple times | expand

Commit Message

Sam Protsenko Dec. 8, 2024, 12:21 a.m. UTC
flag_str[] is a pointer to const. Make it also a const pointer. Improve
a style a bit while a it, to make this line fit 80 characters limit.

No functional change.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
---
 lib/lmb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Ilias Apalodimas Dec. 8, 2024, 6:50 a.m. UTC | #1
On Sun, 8 Dec 2024 at 02:21, Sam Protsenko <semen.protsenko@linaro.org> wrote:
>
> flag_str[] is a pointer to const. Make it also a const pointer. Improve
> a style a bit while a it, to make this line fit 80 characters limit.
>
> No functional change.
>
> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
> ---
>  lib/lmb.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lib/lmb.c b/lib/lmb.c
> index ce0dc49345fb..1642ce48bbbd 100644
> --- a/lib/lmb.c
> +++ b/lib/lmb.c
> @@ -482,7 +482,8 @@ static int lmb_map_update_notify(phys_addr_t addr, phys_size_t size, u8 op,
>
>  static void lmb_print_region_flags(enum lmb_flags flags)
>  {
> -       const char *flag_str[] = { "none", "no-map", "no-overwrite", "no-notify" };
> +       const char * const flag_str[] = { "none", "no-map", "no-overwrite",
> +                                         "no-notify" };
>         unsigned int pflags = flags &
>                               (LMB_NOMAP | LMB_NOOVERWRITE | LMB_NONOTIFY);
>
> --
> 2.39.5
>

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

Patch

diff --git a/lib/lmb.c b/lib/lmb.c
index ce0dc49345fb..1642ce48bbbd 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -482,7 +482,8 @@  static int lmb_map_update_notify(phys_addr_t addr, phys_size_t size, u8 op,
 
 static void lmb_print_region_flags(enum lmb_flags flags)
 {
-	const char *flag_str[] = { "none", "no-map", "no-overwrite", "no-notify" };
+	const char * const flag_str[] = { "none", "no-map", "no-overwrite",
+					  "no-notify" };
 	unsigned int pflags = flags &
 			      (LMB_NOMAP | LMB_NOOVERWRITE | LMB_NONOTIFY);