diff options
author | Sean Christopherson <seanjc@google.com> | 2022-05-28 01:09:52 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-06-11 18:47:27 +0300 |
commit | d8ba3f14a50e4bc9745bb8f66a599c6be8ad0cda (patch) | |
tree | ff5ddef871b5fa38995a3a8f65d04fbc52a3bded /tools/testing/selftests/kvm/kvm_binary_stats_test.c | |
parent | 032604529827cf889e470dc9b3ad18b2a40311b3 (diff) | |
download | linux-d8ba3f14a50e4bc9745bb8f66a599c6be8ad0cda.tar.xz |
KVM: selftests: Return an 'unsigned int' from kvm_check_cap()
Return an 'unsigned int' instead of a signed 'int' from kvm_check_cap(),
to make it more obvious that kvm_check_cap() can never return a negative
value due to its assertion that the return is ">= 0".
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/kvm_binary_stats_test.c')
-rw-r--r-- | tools/testing/selftests/kvm/kvm_binary_stats_test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/kvm/kvm_binary_stats_test.c b/tools/testing/selftests/kvm/kvm_binary_stats_test.c index 7f2ddc1535d7..982bf3f7d9c5 100644 --- a/tools/testing/selftests/kvm/kvm_binary_stats_test.c +++ b/tools/testing/selftests/kvm/kvm_binary_stats_test.c @@ -213,7 +213,7 @@ int main(int argc, char *argv[]) } /* Check the extension for binary stats */ - if (kvm_check_cap(KVM_CAP_BINARY_STATS_FD) <= 0) { + if (!kvm_check_cap(KVM_CAP_BINARY_STATS_FD)) { print_skip("Binary form statistics interface is not supported"); exit(KSFT_SKIP); } |