Skip to content

Commit

Permalink
KVM: Clean up kvm_vm_ioctl_create_vcpu()
Browse files Browse the repository at this point in the history
Since c9d6015 ("KVM: allow KVM_BUG/KVM_BUG_ON to handle 64-bit cond")
'cond' is internally converted to boolean, so caller's explicit conversion
from void* is unnecessary.

Remove the double bang.

Signed-off-by: Michal Luczaj <[email protected]>
Reviewed-by: Yuan Yao <[email protected]>
base-commit: 76a17bf03a268bc342e08c05d8ddbe607d294eb4
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>
  • Loading branch information
mmhal authored and sean-jc committed Jun 6, 2023
1 parent 2272526 commit 5f643e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3975,7 +3975,7 @@ static int kvm_vm_ioctl_create_vcpu(struct kvm *kvm, u32 id)
if (r < 0)
goto kvm_put_xa_release;

if (KVM_BUG_ON(!!xa_store(&kvm->vcpu_array, vcpu->vcpu_idx, vcpu, 0), kvm)) {
if (KVM_BUG_ON(xa_store(&kvm->vcpu_array, vcpu->vcpu_idx, vcpu, 0), kvm)) {
r = -EINVAL;
goto kvm_put_xa_release;
}
Expand Down

0 comments on commit 5f643e4

Please sign in to comment.