Commit 08ff0d5e authored by Yaowei Bai's avatar Yaowei Bai Committed by Paolo Bonzini

KVM: kvm_para_has_feature can be boolean

This patch makes kvm_para_has_feature return bool due to this
particular function only using either one or zero as its return
value.

No functional change.
Signed-off-by: default avatarYaowei Bai <baiyaowei@cmss.chinamobile.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 33e94154
...@@ -4,10 +4,8 @@ ...@@ -4,10 +4,8 @@
#include <uapi/linux/kvm_para.h> #include <uapi/linux/kvm_para.h>
static inline int kvm_para_has_feature(unsigned int feature) static inline bool kvm_para_has_feature(unsigned int feature)
{ {
if (kvm_arch_para_features() & (1UL << feature)) return !!(kvm_arch_para_features() & (1UL << feature));
return 1;
return 0;
} }
#endif /* __LINUX_KVM_PARA_H */ #endif /* __LINUX_KVM_PARA_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment