diff options
author | Ahmed S. Darwish <darwish.07@gmail.com> | 2007-02-19 14:37:46 +0200 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-03-04 11:12:39 +0200 |
commit | 9d8f549dc69b1fc65d0b03916c02f12ca49b3ea0 (patch) | |
tree | 938b47ff9c507b266ea57713cc2233b59b6850df /drivers/kvm/vmx.c | |
parent | de979caacca51c929d2cc2f0f79611ee4a1bc8a5 (diff) | |
download | op-kernel-dev-9d8f549dc69b1fc65d0b03916c02f12ca49b3ea0.zip op-kernel-dev-9d8f549dc69b1fc65d0b03916c02f12ca49b3ea0.tar.gz |
KVM: Use ARRAY_SIZE macro instead of manual calculation.
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Signed-off-by: Dor Laor <dor.laor@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/vmx.c')
-rw-r--r-- | drivers/kvm/vmx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index e02c598..d1198e2 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c @@ -19,6 +19,7 @@ #include "vmx.h" #include "kvm_vmx.h" #include <linux/module.h> +#include <linux/kernel.h> #include <linux/mm.h> #include <linux/highmem.h> #include <linux/profile.h> @@ -75,7 +76,7 @@ static const u32 vmx_msr_index[] = { #endif MSR_EFER, MSR_K6_STAR, }; -#define NR_VMX_MSR (sizeof(vmx_msr_index) / sizeof(*vmx_msr_index)) +#define NR_VMX_MSR ARRAY_SIZE(vmx_msr_index) static inline int is_page_fault(u32 intr_info) { |