[PATCH v4 4/4] lib: utils/fdt: rename fdt_parse_max_hart_id

Anup Patel anup at brainfault.org
Fri May 13 05:49:24 PDT 2022


On Fri, May 13, 2022 at 4:29 PM Jan Remes <jan.remes at codasip.com> wrote:
>
> The function returns the highest hart-id of the harts actually used in
> the system (enabled). Change the name to reflect this fact.
>
> Signed-off-by: Jan Remes <jan.remes at codasip.com>

Looks good to me.

Reviewed-by: Anup Patel <anup at brainfault.org>

Regards,
Anup

> ---
>  include/sbi_utils/fdt/fdt_helper.h | 2 +-
>  lib/utils/fdt/fdt_helper.c         | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/sbi_utils/fdt/fdt_helper.h b/include/sbi_utils/fdt/fdt_helper.h
> index a9c0a8a..74ea234 100644
> --- a/include/sbi_utils/fdt/fdt_helper.h
> +++ b/include/sbi_utils/fdt/fdt_helper.h
> @@ -52,7 +52,7 @@ bool fdt_node_is_enabled(void *fdt, int nodeoff);
>
>  int fdt_parse_hart_id(void *fdt, int cpu_offset, u32 *hartid);
>
> -int fdt_parse_max_hart_id(void *fdt, u32 *max_hartid);
> +int fdt_parse_max_enabled_hart_id(void *fdt, u32 *max_hartid);
>
>  int fdt_parse_timebase_frequency(void *fdt, unsigned long *freq);
>
> diff --git a/lib/utils/fdt/fdt_helper.c b/lib/utils/fdt/fdt_helper.c
> index 5db3fbe..2bdb1ef 100644
> --- a/lib/utils/fdt/fdt_helper.c
> +++ b/lib/utils/fdt/fdt_helper.c
> @@ -262,7 +262,7 @@ int fdt_parse_hart_id(void *fdt, int cpu_offset, u32 *hartid)
>         return 0;
>  }
>
> -int fdt_parse_max_hart_id(void *fdt, u32 *max_hartid)
> +int fdt_parse_max_enabled_hart_id(void *fdt, u32 *max_hartid)
>  {
>         u32 hartid;
>         int err, cpu_offset, cpus_offset;
> --
> 2.36.1
>
>
> --
> opensbi mailing list
> opensbi at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/opensbi



More information about the opensbi mailing list