Skip to content

Commit cf6c26e

Browse files
calmisibonzini
authored andcommitted
KVM: x86: Code style cleanup in kvm_arch_dev_ioctl()
In kvm_arch_dev_ioctl(), the brackets of case KVM_X86_GET_MCE_CAP_SUPPORTED accidently encapsulates case KVM_GET_MSR_FEATURE_INDEX_LIST and case KVM_GET_MSRS. It doesn't affect functionality but it's misleading. Remove unnecessary brackets and opportunistically add a "break" in the default path. Suggested-by: Sean Christopherson <sean.j.christopherson@intel.com> Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com> Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 2b110b6 commit cf6c26e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎arch/x86/kvm/x86.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3488,7 +3488,7 @@ long kvm_arch_dev_ioctl(struct file *filp,
34883488
r = 0;
34893489
break;
34903490
}
3491-
case KVM_X86_GET_MCE_CAP_SUPPORTED: {
3491+
case KVM_X86_GET_MCE_CAP_SUPPORTED:
34923492
r = -EFAULT;
34933493
if (copy_to_user(argp, &kvm_mce_cap_supported,
34943494
sizeof(kvm_mce_cap_supported)))
@@ -3520,9 +3520,9 @@ long kvm_arch_dev_ioctl(struct file *filp,
35203520
case KVM_GET_MSRS:
35213521
r = msr_io(NULL, argp, do_get_msr_feature, 1);
35223522
break;
3523-
}
35243523
default:
35253524
r = -EINVAL;
3525+
break;
35263526
}
35273527
out:
35283528
return r;

0 commit comments

Comments
 (0)