[PATCH v12 26/29] KVM: arm64: selftests: Remove spurious check for single bit safe values

From: Mark Brown

Date: Thu Jul 09 2026 - 14:47:28 EST


get_safe_value() currently asserts that bitfields it is generating a safe
value for must be more than one bit wide but in actual fact it should
always be possible to generate a safe value to write to a bitfield even if
it is just the current value and the function correctly handles that.
Remove the assert.

Fixes: bf09ee918053e ("KVM: arm64: selftests: Remove ARM64_FEATURE_FIELD_BITS and its last user")
Reviewed-by: Ben Horgan <ben.horgan@xxxxxxx>
Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
---
tools/testing/selftests/kvm/arm64/set_id_regs.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/tools/testing/selftests/kvm/arm64/set_id_regs.c b/tools/testing/selftests/kvm/arm64/set_id_regs.c
index 7429a1055df5..9eceac84e297 100644
--- a/tools/testing/selftests/kvm/arm64/set_id_regs.c
+++ b/tools/testing/selftests/kvm/arm64/set_id_regs.c
@@ -279,8 +279,6 @@ u64 get_safe_value(const struct reg_ftr_bits *ftr_bits, u64 ftr)
{
u64 ftr_max = ftr_bits->mask >> ftr_bits->shift;

- TEST_ASSERT(ftr_max > 1, "This test doesn't support single bit features");
-
if (ftr_bits->sign == FTR_UNSIGNED) {
switch (ftr_bits->type) {
case FTR_EXACT:

--
2.47.3