[PATCH 4/7] lib: sbi: sse: remove superfluous sbi_list_empty() check

Clément Léger cleger at rivosinc.com
Tue Apr 9 03:02:05 PDT 2024


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>
---
 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




More information about the opensbi mailing list