diff options
author | 2022-05-27 15:09:52 -0700 | |
---|---|---|
committer | 2022-06-11 11:47:27 -0400 | |
commit | d8ba3f14a50e4bc9745bb8f66a599c6be8ad0cda (patch) | |
tree | ff5ddef871b5fa38995a3a8f65d04fbc52a3bded /tools/testing/selftests/kvm/lib | |
parent | KVM: selftests: Drop DEFAULT_GUEST_PHY_PAGES, open code the magic number (diff) | |
download | linux-dev-d8ba3f14a50e4bc9745bb8f66a599c6be8ad0cda.tar.xz linux-dev-d8ba3f14a50e4bc9745bb8f66a599c6be8ad0cda.zip |
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/lib')
-rw-r--r-- | tools/testing/selftests/kvm/lib/kvm_util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/kvm/lib/kvm_util.c b/tools/testing/selftests/kvm/lib/kvm_util.c index 86e7f5afce63..4cf0e6bf33bb 100644 --- a/tools/testing/selftests/kvm/lib/kvm_util.c +++ b/tools/testing/selftests/kvm/lib/kvm_util.c @@ -69,7 +69,7 @@ int open_kvm_dev_path_or_exit(void) * Looks up and returns the value corresponding to the capability * (KVM_CAP_*) given by cap. */ -int kvm_check_cap(long cap) +unsigned int kvm_check_cap(long cap) { int ret; int kvm_fd; |