From: "Radim Krčmář" <rkrcmar@redhat.com>
To: kbuild test robot <fengguang.wu@intel.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
kbuild-all@01.org, kvm@vger.kernel.org,
Robert Hu <robert.hu@intel.com>,
Farrah Chen <farrah.chen@intel.com>
Subject: Re: [PATCH] KVM: nVMX: fix boolreturn.cocci warnings
Date: Tue, 1 Aug 2017 22:39:47 +0200 [thread overview]
Message-ID: <20170801203947.GC316@flask> (raw)
In-Reply-To: <20170727220315.GA45672@lkp-ib04>
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 <fengguang.wu@intel.com>
> ---
>
> 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)
prev parent reply other threads:[~2017-08-01 20:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-27 22:03 [kvm:queue 12/16] arch/x86/kvm/vmx.c:8192:8-9: WARNING: return of 0/1 in function 'nested_vmx_reflect_vmexit' with return type bool kbuild test robot
2017-07-27 22:03 ` [PATCH] KVM: nVMX: fix boolreturn.cocci warnings kbuild test robot
2017-08-01 20:39 ` Radim Krčmář [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170801203947.GC316@flask \
--to=rkrcmar@redhat.com \
--cc=farrah.chen@intel.com \
--cc=fengguang.wu@intel.com \
--cc=kbuild-all@01.org \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=robert.hu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).