lib: sbi: Simplify sbi_ipi_process remove goto

Simplify sbi_ipi_process() by removing goto statement.

Signed-off-by: Xiang W <wxjstz@126.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Xiang W 2023-04-25 16:56:24 +08:00 committed by Anup Patel
parent 4e3353057a
commit 6bc02dede8
1 changed files with 5 additions and 8 deletions

View 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++;
}