KVM: riscv: selftests: Fix get-reg-list print_reg defaults
authorAndrew Jones <ajones@ventanamicro.com>
Thu, 7 Dec 2023 13:40:13 +0000 (14:40 +0100)
committerAnup Patel <anup@brainfault.org>
Wed, 13 Dec 2023 06:25:15 +0000 (11:55 +0530)
commit3279f526952f82b2967663c36c12a01f125cbbfd
tree4932602d80edcf96a6dea70b152c3032cd05ec4a
parenta39b6ac3781d46ba18193c9dbb2110f31e9bffe9
KVM: riscv: selftests: Fix get-reg-list print_reg defaults

print_reg() will print everything it knows when it encounters
a register ID it's unfamiliar with in the default cases of its
decoding switches. Fix several issues with these (until now,
never tested) paths; missing newlines in printfs, missing
complement operator in mask, and missing return in order to
avoid continuing to decode.

Fixes: 62d0c458f828 ("KVM: riscv: selftests: get-reg-list print_reg should never fail")
Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Haibo Xu <haibo1.xu@intel.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
tools/testing/selftests/kvm/riscv/get-reg-list.c