lib: sbi: Simplify sbi_ipi_process remove goto
authorXiang W <wxjstz@126.com>
Tue, 25 Apr 2023 08:56:24 +0000 (16:56 +0800)
committerAnup Patel <anup@brainfault.org>
Thu, 11 May 2023 07:16:42 +0000 (12:46 +0530)
Simplify sbi_ipi_process() by removing goto statement.

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

index ba83f24..ad09154 100644 (file)
@@ -223,14 +223,11 @@ void sbi_ipi_process(void)
        ipi_type = atomic_raw_xchg_ulong(&ipi_data->ipi_type, 0);
        ipi_event = 0;
        while (ipi_type) {
-               if (!(ipi_type & 1UL))
-                       goto skip;
-
-               ipi_ops = ipi_ops_array[ipi_event];
-               if (ipi_ops && ipi_ops->process)
-                       ipi_ops->process(scratch);
-
-skip:
+               if (ipi_type & 1UL) {
+                       ipi_ops = ipi_ops_array[ipi_event];
+                       if (ipi_ops && ipi_ops->process)
+                               ipi_ops->process(scratch);
+               }
                ipi_type = ipi_type >> 1;
                ipi_event++;
        }