[PATCH v4 05/16] include: sbi: Make hartmask pointer const in sbi_hartmask_test_hart()
Anup Patel
Anup.Patel at wdc.com
Wed Oct 21 03:05:28 EDT 2020
> -----Original Message-----
> From: Anup Patel <Anup.Patel at wdc.com>
> Sent: 20 October 2020 15:09
> To: Atish Patra <Atish.Patra at wdc.com>; Alistair Francis
> <Alistair.Francis at wdc.com>
> Cc: Anup Patel <anup at brainfault.org>; opensbi at lists.infradead.org; Anup
> Patel <Anup.Patel at wdc.com>; Alistair Francis <Alistair.Francis at wdc.com>
> Subject: [PATCH v4 05/16] include: sbi: Make hartmask pointer const in
> sbi_hartmask_test_hart()
>
> The sbi_hartmask_test_hart() does not modify hartmask so the hartmask
> pointer parameter should be declared const.
>
> Signed-off-by: Anup Patel <anup.patel at wdc.com>
> Reviewed-by: Atish Patra <atish.patra at wdc.com>
> Reviewed-by: Alistair Francis <alistair.francis at wdc.com>
> ---
> include/sbi/sbi_hartmask.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/sbi/sbi_hartmask.h b/include/sbi/sbi_hartmask.h index
> 77e42cb..f1cef0c 100644
> --- a/include/sbi/sbi_hartmask.h
> +++ b/include/sbi/sbi_hartmask.h
> @@ -67,7 +67,7 @@ static inline void sbi_hartmask_clear_hart(u32 h, struct
> sbi_hartmask *m)
> * @param h HART id to test
> * @param m the hartmask pointer
> */
> -static inline int sbi_hartmask_test_hart(u32 h, struct sbi_hartmask *m)
> +static inline int sbi_hartmask_test_hart(u32 h, const struct
> +sbi_hartmask *m)
> {
> if (h < SBI_HARTMASK_MAX_BITS)
> return __test_bit(h, m->bits);
> --
> 2.25.1
Applied this patch to the riscv/opensbi repo
Regards,
Anup
More information about the opensbi
mailing list