* [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
@ 2017-07-27 22:03 kbuild test robot
2017-07-27 22:03 ` [PATCH] KVM: nVMX: fix boolreturn.cocci warnings kbuild test robot
0 siblings, 1 reply; 3+ messages in thread
From: kbuild test robot @ 2017-07-27 22:03 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: kbuild-all, kvm, Robert Hu, Farrah Chen
tree: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
head: 85ad25fe73f7a8c7f60465316b877a3b2d95eae6
commit: fef40abd18fd5192c6e68d3c47062f455aa6c511 [12/16] KVM: nVMX: do not fill vm_exit_intr_error_code in prepare_vmcs12
coccinelle warnings: (new ones prefixed by >>)
>> arch/x86/kvm/vmx.c:8192:8-9: WARNING: return of 0/1 in function 'nested_vmx_reflect_vmexit' with return type bool
Please review and possibly fold the followup patch.
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] KVM: nVMX: fix boolreturn.cocci warnings
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 ` kbuild test robot
2017-08-01 20:39 ` Radim Krčmář
0 siblings, 1 reply; 3+ messages in thread
From: kbuild test robot @ 2017-07-27 22:03 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: kbuild-all, kvm, Robert Hu, Farrah Chen
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;
}
static void vmx_get_exit_info(struct kvm_vcpu *vcpu, u64 *info1, u64 *info2)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] KVM: nVMX: fix boolreturn.cocci warnings
2017-07-27 22:03 ` [PATCH] KVM: nVMX: fix boolreturn.cocci warnings kbuild test robot
@ 2017-08-01 20:39 ` Radim Krčmář
0 siblings, 0 replies; 3+ messages in thread
From: Radim Krčmář @ 2017-08-01 20:39 UTC (permalink / raw)
To: kbuild test robot; +Cc: Paolo Bonzini, kbuild-all, kvm, Robert Hu, Farrah Chen
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)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-01 20:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).