diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2016-07-04 15:13:07 +0000 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-07-05 14:41:45 +0200 |
commit | 03f6a22a3979f20575c39ff86c79b3fa3b7f469d (patch) | |
tree | eeb531774377afb333f0ee65c91faf5ca78af3aa /arch/x86 | |
parent | add6a0cd1c5ba51b201e1361b05a5df817083618 (diff) | |
download | op-kernel-dev-03f6a22a3979f20575c39ff86c79b3fa3b7f469d.zip op-kernel-dev-03f6a22a3979f20575c39ff86c79b3fa3b7f469d.tar.gz |
KVM: x86: Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element
Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kvm/vmx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 85e2f0a..e564fa2 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -1112,7 +1112,7 @@ static inline bool cpu_has_broken_vmx_preemption_timer(void) /* Clear the reserved bits */ eax &= ~(0x3U << 14 | 0xfU << 28); - for (i = 0; i < sizeof(vmx_preemption_cpu_tfms)/sizeof(u32); i++) + for (i = 0; i < ARRAY_SIZE(vmx_preemption_cpu_tfms); i++) if (eax == vmx_preemption_cpu_tfms[i]) return true; |