[PATCH v2 2/4] selftests: riscv: Add braces around EXPECT_EQ()
Sergey Matyukevich
geomatsi at gmail.com
Tue Mar 10 01:17:50 PDT 2026
On Mon, Mar 09, 2026 at 06:52:11PM -0700, Charlie Jenkins via B4 Relay wrote:
> From: Charlie Jenkins <thecharlesjenkins at gmail.com>
>
> EXPECT_EQ() expands to multiple lines, breaking up one-line if
> statements. This issue was not present in the patch on the mailing list
> but was instead introduced by the maintainer when attempting to fix up
> checkpatch warnings. Add braces around EXPECT_EQ() to avoid the error
> even though checkpatch suggests them to be removed:
>
> validate_v_ptrace.c:626:17: error: ‘else’ without a previous ‘if’
>
> Fixes: 3789d5eecd5a ("selftests: riscv: verify syscalls discard vector context")
> Fixes: 30eb191c895b ("selftests: riscv: verify ptrace rejects invalid vector csr inputs")
> Fixes: 849f05ae1ea6 ("selftests: riscv: verify ptrace accepts valid vector csr values")
> Signed-off-by: Charlie Jenkins <thecharlesjenkins at gmail.com>
> ---
> tools/testing/selftests/riscv/vector/validate_v_ptrace.c | 15 +++++++++------
> 1 file changed, 9 insertions(+), 6 deletions(-)
Reviewed-and-Tested-by: Sergey Matyukevich <geomatsi at gmail.com>
Thanks,
Sergey
More information about the linux-riscv
mailing list