lib: sbi: Return SBI_EALREADY error code if SSE event is present
PATCH 1/1 lib: sbi: Return SBI_EALREADY error code if SSE event is present
Return SBI_EALREADY error code instead of SBI_INVAL, in case an event is already added to the supported list.
--- lib/sbi/sbi_sse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/sbi/sbi_sse.c +1 -1
@@ -926,7 +926,7 @@ int sbi_sse_add_event(uint32_t event_id, const struct sbi_sse_cb_ops *cb_ops)/* Do not allow adding an event twice */ info =sse_event_info_get (event_id);if (info) -return SBI_EINVAL ; +return SBI_EALREADY ;if (cb_ops && cb_ops->set_hartid_cb && !EVENT_IS_GLOBAL (event_id))return SBI_EINVAL ;
Signature · 1 line
2.43.0
PATCH 1/1 lib: sbi: Return SBI_EALREADY error code if SSE event is present
Quoted 5 lines · On Thu, Feb 20, 2025 at 2:48?PM Himanshu Chauhan <[email protected]>…
Return
SBI_EALREADYerror code instead ofSBI_INVAL, in case an event is already added to the supported list.Signed-off-by Himanshu Chauhan <[email protected]>
LGTM.
Regards,
Anup
Quoted 25 lines
--- lib/sbi/sbi_sse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)lib/sbi/sbi_sse.c +1
-2@@ -926,7 +926,7 @@ int sbi_sse_add_event(uint32_t event_id, const struct sbi_sse_cb_ops *cb_ops)/* Do not allow adding an event twice */ info =sse_event_info_get (event_id);if (info) -return SBI_EINVAL ; +return SBI_EALREADY ;if (cb_ops && cb_ops->set_hartid_cb && !EVENT_IS_GLOBAL (event_id))return SBI_EINVAL ; --2.43.0
--
opensbi mailing list
opensbi at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi
Anup Patel
AppliedPATCH 1/1 lib: sbi: Return SBI_EALREADY error code if SSE event is present
In reply to Himanshu ChauhanQuoted 5 lines · On Thu, Feb 20, 2025 at 2:48?PM Himanshu Chauhan <[email protected]>…
Return
SBI_EALREADYerror code instead ofSBI_INVAL, in case an event is already added to the supported list.Signed-off-by Himanshu Chauhan <[email protected]>
Applied this patch to the riscv/opensbi repo.
Thanks,
Anup
Quoted 25 lines
--- lib/sbi/sbi_sse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)lib/sbi/sbi_sse.c +1
-2@@ -926,7 +926,7 @@ int sbi_sse_add_event(uint32_t event_id, const struct sbi_sse_cb_ops *cb_ops)/* Do not allow adding an event twice */ info =sse_event_info_get (event_id);if (info) -return SBI_EINVAL ; +return SBI_EALREADY ;if (cb_ops && cb_ops->set_hartid_cb && !EVENT_IS_GLOBAL (event_id))return SBI_EINVAL ; --2.43.0
--
opensbi mailing list
opensbi at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi