[PATCH 4/7] lib: sbi: sse: remove superfluous sbi_list_empty() check
Anup Patel
anup at brainfault.org
Tue May 7 01:50:02 PDT 2024
On Tue, Apr 9, 2024 at 3:32 PM Clément Léger <cleger at rivosinc.com> wrote:
>
> The list loop below that check is actually not looping if the list is
> empty so there was no need for this check.
>
> Signed-off-by: Clément Léger <cleger at rivosinc.com>
> Reported-by: Samuel Holland <samuel.holland at sifive.com>
LGTM.
Reviewed-by: Anup Patel <anup at brainfault.org>
Regards,
Anup
> ---
> lib/sbi/sbi_sse.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/lib/sbi/sbi_sse.c b/lib/sbi/sbi_sse.c
> index cd8a539..61d1f78 100644
> --- a/lib/sbi/sbi_sse.c
> +++ b/lib/sbi/sbi_sse.c
> @@ -578,9 +578,6 @@ void sbi_sse_process_pending_events(struct sbi_trap_regs *regs)
>
> spin_lock(&state->enabled_event_lock);
>
> - if (sbi_list_empty(&state->enabled_event_list))
> - goto out;
> -
> sbi_list_for_each_entry(e, &state->enabled_event_list, node) {
> ret = sse_event_check_inject(e, regs);
> if (ret)
> --
> 2.43.0
>
>
> --
> opensbi mailing list
> opensbi at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/opensbi
More information about the opensbi
mailing list