lib: sbi_ipi: Drop unnecessary ipi_process check
authorSamuel Holland <samuel.holland@sifive.com>
Fri, 8 Dec 2023 21:22:59 +0000 (13:22 -0800)
committerAnup Patel <anup@brainfault.org>
Mon, 18 Dec 2023 13:56:35 +0000 (19:26 +0530)
sbi_ipi_event_create() disallows registering an IPI event with a NULL
.process callback, so the function pointer will never be NULL here.

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Reviewed-by: Xiang W <wxjstz@126.com>
lib/sbi/sbi_ipi.c

index bbc97f7f46330e33db57991551b8b23f5dc74795..048aaa6687ecde86583a13c218a9e4fce4ea8c70 100644 (file)
@@ -243,7 +243,7 @@ void sbi_ipi_process(void)
        while (ipi_type) {
                if (ipi_type & 1UL) {
                        ipi_ops = ipi_ops_array[ipi_event];
-                       if (ipi_ops && ipi_ops->process)
+                       if (ipi_ops)
                                ipi_ops->process(scratch);
                }
                ipi_type = ipi_type >> 1;