From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH] KVM: nVMX: fix boolreturn.cocci warnings Date: Tue, 1 Aug 2017 22:39:47 +0200 Message-ID: <20170801203947.GC316@flask> References: <201707280612.LF0TOKTz%fengguang.wu@intel.com> <20170727220315.GA45672@lkp-ib04> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Paolo Bonzini , kbuild-all@01.org, kvm@vger.kernel.org, Robert Hu , Farrah Chen To: kbuild test robot Return-path: Received: from mx1.redhat.com ([209.132.183.28]:42696 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752310AbdHAUj4 (ORCPT ); Tue, 1 Aug 2017 16:39:56 -0400 Content-Disposition: inline In-Reply-To: <20170727220315.GA45672@lkp-ib04> Sender: kvm-owner@vger.kernel.org List-ID: 2017-07-28 06:03+0800, kbuild test robot: > arch/x86/kvm/vmx.c:8192:8-9: WARNING: return of 0/1 in function 'nested_vmx_reflect_vmexit' with return type bool > > Return statements in functions returning bool should use > true/false instead of 1/0. > Generated by: scripts/coccinelle/misc/boolreturn.cocci > > Fixes: fef40abd18fd ("KVM: nVMX: do not fill vm_exit_intr_error_code in prepare_vmcs12") > Signed-off-by: Fengguang Wu > --- > > vmx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- a/arch/x86/kvm/vmx.c > +++ b/arch/x86/kvm/vmx.c > @@ -8189,7 +8189,7 @@ static bool nested_vmx_reflect_vmexit(st > > nested_vmx_vmexit(vcpu, exit_reason, exit_intr_info, > vmcs_readl(EXIT_QUALIFICATION)); > - return 1; > + return true; We actually wanted to return 1, which means "do not exit to user-space", so I've changed the return type to int instead and pushed to kvm/queue. Thanks for the report! > } > > static void vmx_get_exit_info(struct kvm_vcpu *vcpu, u64 *info1, u64 *info2)