lib: sbi: cosmetic changes to reduce indentation

In preparation for subsequent patches.

Signed-off-by: Bo Gan <ganboing@gmail.com>
Tested-by: Anirudh Srinivasan <asrinivasan@oss.tenstorrent.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20260609060024.706-2-ganboing@gmail.com
Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Bo Gan
2026-06-08 23:00:21 -07:00
committed by Anup Patel
parent 3afe63d4e3
commit 4120e6dce2
+7 -4
View File
@@ -11,6 +11,7 @@
#include <sbi/riscv_asm.h>
#include <sbi/riscv_encoding.h>
#include <sbi/sbi_bitops.h>
#include <sbi/sbi_error.h>
#include <sbi/sbi_trap_ldst.h>
#include <sbi/sbi_trap.h>
@@ -189,7 +190,9 @@ int sbi_misaligned_v_ld_emulator(ulong insn, struct sbi_trap_context *tcntx)
get_vreg(vlenb, 0, 0, vlenb, mask);
do {
if (!masked || ((mask[vstart / 8] >> (vstart % 8)) & 1)) {
if (masked && (~mask[vstart / 8] & BIT(vstart % 8)))
continue;
/* compute element address */
ulong addr = base + vstart * stride;
@@ -226,7 +229,6 @@ int sbi_misaligned_v_ld_emulator(ulong insn, struct sbi_trap_context *tcntx)
for (ulong seg = 0; seg < nf; seg++)
set_vreg(vlenb, vd + seg * emul, vstart * len,
len, &bytes[seg * len]);
}
} while (++vstart < vl);
/* restore clobbered vl/vtype */
@@ -288,7 +290,9 @@ int sbi_misaligned_v_st_emulator(ulong insn, struct sbi_trap_context *tcntx)
get_vreg(vlenb, 0, 0, vlenb, mask);
do {
if (!masked || ((mask[vstart / 8] >> (vstart % 8)) & 1)) {
if (masked && (~mask[vstart / 8] & BIT(vstart % 8)))
continue;
/* compute element address */
ulong addr = base + vstart * stride;
@@ -319,7 +323,6 @@ int sbi_misaligned_v_st_emulator(ulong insn, struct sbi_trap_context *tcntx)
}
}
}
}
} while (++vstart < vl);
/* restore clobbered vl/vtype */