diff options
| author | Xiang W <wxjstz@126.com> | 2023-04-25 16:56:24 +0800 |
|---|---|---|
| committer | Anup Patel <anup@brainfault.org> | 2023-05-11 12:46:42 +0530 |
| commit | 6bc02dede86c47f87e65293b7099e9caf3b22c29 (patch) | |
| tree | 4183f8e45866396b6d7955ae9bd0c34b58e84d1b | |
| parent | 4e3353057a3b975ca58c9b831749e2760f7812c0 (diff) | |
| download | opensbi-6bc02dede86c47f87e65293b7099e9caf3b22c29.tar.gz opensbi-6bc02dede86c47f87e65293b7099e9caf3b22c29.zip | |
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>
| -rw-r--r-- | lib/sbi/sbi_ipi.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/sbi/sbi_ipi.c b/lib/sbi/sbi_ipi.c index ba83f245..ad091545 100644 --- a/lib/sbi/sbi_ipi.c +++ b/lib/sbi/sbi_ipi.c @@ -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++; } |
