Thread (17 messages) 17 messages, 3 authors, 2025-08-28

Re: [External] [PATCH v6 3/5] drivers: firmware: add riscv SSE support

From: Clément Léger <hidden>
Date: 2025-08-12 12:57:13
Also in: linux-riscv, lkml


On 12/08/2025 14:54, yunhui cui wrote:
quoted
                                                      &preferred_hart);
+                       if (ret)
+                               goto err_event_free;
+
+                       cpu = riscv_hartid_to_cpuid(preferred_hart);
+                       sse_global_event_update_cpu(event, cpu);
+
+                       ret = sse_sbi_register_event(event, event->global);
+                       if (ret)
+                               goto err_event_free;
+
+               } else {
+                       sse_on_each_cpu(event, SBI_SSE_EVENT_REGISTER,
+                                       SBI_SSE_EVENT_DISABLE);
+               }
It is necessary to check the return value; otherwise, the event might
be passed as a valid value to subsequent logic, such as
sse_event_enable().
Hi Yunhui,

Indeed, nice catch. I'll fix that.

Thanks,

Clément
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help