* [PATCH] KVM: nSVM: Assign boolean values to a bool variable
@ 2021-01-22 3:49 Jiapeng Zhong
0 siblings, 0 replies; only message in thread
From: Jiapeng Zhong @ 2021-01-22 3:49 UTC (permalink / raw)
To: pbonzini
Cc: seanjc, vkuznets, wanpengli, jmattson, joro, tglx, mingo, bp,
x86, hpa, kvm, linux-kernel, Jiapeng Zhong
Fix the following coccicheck warnings:
./arch/x86/kvm/svm/nested.c:752:2-32: WARNING: Assignment of
0/1 to bool variable.
./arch/x86/kvm/svm/nested.c:545:1-31: WARNING: Assignment of
0/1 to bool variable.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
---
arch/x86/kvm/svm/nested.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c
index cb4c6ee..3b2b445 100644
--- a/arch/x86/kvm/svm/nested.c
+++ b/arch/x86/kvm/svm/nested.c
@@ -534,7 +534,7 @@ int nested_svm_vmrun(struct vcpu_svm *svm)
copy_vmcb_control_area(&hsave->control, &vmcb->control);
- svm->nested.nested_run_pending = 1;
+ svm->nested.nested_run_pending = true;
if (enter_svm_guest_mode(svm, vmcb12_gpa, vmcb12))
goto out_exit_err;
@@ -543,7 +543,7 @@ int nested_svm_vmrun(struct vcpu_svm *svm)
goto out;
out_exit_err:
- svm->nested.nested_run_pending = 0;
+ svm->nested.nested_run_pending = false;
svm->vmcb->control.exit_code = SVM_EXIT_ERR;
svm->vmcb->control.exit_code_hi = 0;
--
1.8.3.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-22 3:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-22 3:49 [PATCH] KVM: nSVM: Assign boolean values to a bool variable Jiapeng Zhong
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).