kvm: vmx: fix coccinelle warnings
diff mbox series

Message ID 1563165317-5996-1-git-send-email-wang.yi59@zte.com.cn
State New
Headers show
Series
  • kvm: vmx: fix coccinelle warnings
Related show

Commit Message

Yi Wang July 15, 2019, 4:35 a.m. UTC
This fixes the following coccinelle warning:

WARNING: return of 0/1 in function 'vmx_need_emulation_on_page_fault'
with return type bool

Return false instead of 0.

Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
---
 arch/x86/kvm/vmx/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paolo Bonzini July 15, 2019, 11:55 a.m. UTC | #1
On 15/07/19 06:35, Yi Wang wrote:
> This fixes the following coccinelle warning:
> 
> WARNING: return of 0/1 in function 'vmx_need_emulation_on_page_fault'
> with return type bool
> 
> Return false instead of 0.
> 
> Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
> ---
>  arch/x86/kvm/vmx/vmx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
> index d98eac3..8b5f352 100644
> --- a/arch/x86/kvm/vmx/vmx.c
> +++ b/arch/x86/kvm/vmx/vmx.c
> @@ -7418,7 +7418,7 @@ static int enable_smi_window(struct kvm_vcpu *vcpu)
>  
>  static bool vmx_need_emulation_on_page_fault(struct kvm_vcpu *vcpu)
>  {
> -	return 0;
> +	return false;
>  }
>  
>  static __init int hardware_setup(void)
> 

Queued, thanks.

Paolo

Patch
diff mbox series

diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index d98eac3..8b5f352 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -7418,7 +7418,7 @@  static int enable_smi_window(struct kvm_vcpu *vcpu)
 
 static bool vmx_need_emulation_on_page_fault(struct kvm_vcpu *vcpu)
 {
-	return 0;
+	return false;
 }
 
 static __init int hardware_setup(void)