diff options
author | Christian Borntraeger <borntraeger@de.ibm.com> | 2014-09-04 15:13:31 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-09-05 06:01:14 -0400 |
commit | 34656113182b704682e23d1363417536addfec97 (patch) | |
tree | 9cb8071d4612499e2b1a610db2eb91be1267a97f /virt | |
parent | 54987b7afa902e886b3a751c056c2a4d4701020e (diff) |
KVM: remove redundant check of in_spin_loop
The expression `vcpu->spin_loop.in_spin_loop' is always true,
because it is evaluated only when the condition
`!vcpu->spin_loop.in_spin_loop' is false.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/kvm_main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index bb8641b5d83b..cc7bd286d135 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -1785,8 +1785,7 @@ static bool kvm_vcpu_eligible_for_directed_yield(struct kvm_vcpu *vcpu) | |||
1785 | bool eligible; | 1785 | bool eligible; |
1786 | 1786 | ||
1787 | eligible = !vcpu->spin_loop.in_spin_loop || | 1787 | eligible = !vcpu->spin_loop.in_spin_loop || |
1788 | (vcpu->spin_loop.in_spin_loop && | 1788 | vcpu->spin_loop.dy_eligible; |
1789 | vcpu->spin_loop.dy_eligible); | ||
1790 | 1789 | ||
1791 | if (vcpu->spin_loop.in_spin_loop) | 1790 | if (vcpu->spin_loop.in_spin_loop) |
1792 | kvm_vcpu_set_dy_eligible(vcpu, !vcpu->spin_loop.dy_eligible); | 1791 | kvm_vcpu_set_dy_eligible(vcpu, !vcpu->spin_loop.dy_eligible); |