[PATCH 2/7] lib: sbi: sse: rename sse_hart_unlock() to sse_enabled_event_unlock()

Anup Patel apatel at ventanamicro.com
Tue May 7 04:52:57 PDT 2024


On Tue, Apr 9, 2024 at 3:32 PM Clément Léger <cleger at rivosinc.com> wrote:
>
> There was a naming incoherency between enabled events list lock/unlock.
> Rename sse_hart_unlock() to sse_enabled_event_unlock() to be coherent
> and reword comments above lock()/unlock() functions.
>
> Signed-off-by: Clément Léger <cleger at rivosinc.com>

LGTM.

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

Regards,
Anup

> ---
>  lib/sbi/sbi_sse.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/lib/sbi/sbi_sse.c b/lib/sbi/sbi_sse.c
> index 39b4588..d54c125 100644
> --- a/lib/sbi/sbi_sse.c
> +++ b/lib/sbi/sbi_sse.c
> @@ -208,7 +208,7 @@ static struct sse_global_event *sse_get_global_event(struct sbi_sse_event *e)
>  }
>
>  /**
> - * If event is global, must be called under global event lock
> + * If event is global, must be called under enabled event lock
>   */
>  static void sse_enabled_event_lock(struct sbi_sse_event *e)
>  {
> @@ -219,9 +219,9 @@ static void sse_enabled_event_lock(struct sbi_sse_event *e)
>  }
>
>  /**
> - * If event is global, must be called under global event lock
> + * If event is global, must be called under enabled event lock
>   */
> -static void sse_hart_unlock(struct sbi_sse_event *e)
> +static void sse_enabled_event_unlock(struct sbi_sse_event *e)
>  {
>         struct sse_hart_state *shs;
>
> @@ -753,7 +753,7 @@ int sbi_sse_enable(uint32_t event_id)
>
>         sse_enabled_event_lock(e);
>         ret = sse_event_enable(e);
> -       sse_hart_unlock(e);
> +       sse_enabled_event_unlock(e);
>         sse_event_put(e);
>
>         return ret;
> @@ -770,7 +770,7 @@ int sbi_sse_disable(uint32_t event_id)
>
>         sse_enabled_event_lock(e);
>         ret = sse_event_disable(e);
> -       sse_hart_unlock(e);
> +       sse_enabled_event_unlock(e);
>
>         sse_event_put(e);
>
> --
> 2.43.0
>



More information about the opensbi mailing list