mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-17 01:26:57 +07:00
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>
This commit is contained in:
parent
2b110b6164
commit
cf6c26ec7b
@ -3488,7 +3488,7 @@ long kvm_arch_dev_ioctl(struct file *filp,
|
||||
r = 0;
|
||||
break;
|
||||
}
|
||||
case KVM_X86_GET_MCE_CAP_SUPPORTED: {
|
||||
case KVM_X86_GET_MCE_CAP_SUPPORTED:
|
||||
r = -EFAULT;
|
||||
if (copy_to_user(argp, &kvm_mce_cap_supported,
|
||||
sizeof(kvm_mce_cap_supported)))
|
||||
@ -3520,9 +3520,9 @@ long kvm_arch_dev_ioctl(struct file *filp,
|
||||
case KVM_GET_MSRS:
|
||||
r = msr_io(NULL, argp, do_get_msr_feature, 1);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
r = -EINVAL;
|
||||
break;
|
||||
}
|
||||
out:
|
||||
return r;
|
||||
|
Loading…
Reference in New Issue
Block a user