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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
---
 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 73de5be58bab..bfca7be3e766 100644
--- a/tools/testing/selftests/kvm/arm64/set_id_regs.c
+++ b/tools/testing/selftests/kvm/arm64/set_id_regs.c
@@ -269,8 +269,6 @@ uint64_t get_safe_value(const struct reg_ftr_bits 
*ftr_bits, uint64_t ftr)
 {
        uint64_t 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


Reply via email to