Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Xiaoyao Li and committed by
Paolo Bonzini
cf6c26ec 2b110b61

+2 -2
+2 -2
arch/x86/kvm/x86.c
··· 3488 3488 r = 0; 3489 3489 break; 3490 3490 } 3491 - case KVM_X86_GET_MCE_CAP_SUPPORTED: { 3491 + case KVM_X86_GET_MCE_CAP_SUPPORTED: 3492 3492 r = -EFAULT; 3493 3493 if (copy_to_user(argp, &kvm_mce_cap_supported, 3494 3494 sizeof(kvm_mce_cap_supported))) ··· 3520 3520 case KVM_GET_MSRS: 3521 3521 r = msr_io(NULL, argp, do_get_msr_feature, 1); 3522 3522 break; 3523 - } 3524 3523 default: 3525 3524 r = -EINVAL; 3525 + break; 3526 3526 } 3527 3527 out: 3528 3528 return r;