Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 03f6a22a authored by Wei Yongjun's avatar Wei Yongjun Committed by Paolo Bonzini
Browse files

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent add6a0cd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;