diff options
author | Ahmed S. Darwish <darwish.07@gmail.com> | 2007-02-19 07:37:46 -0500 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-03-04 04:12:39 -0500 |
commit | 9d8f549dc69b1fc65d0b03916c02f12ca49b3ea0 (patch) | |
tree | 938b47ff9c507b266ea57713cc2233b59b6850df /drivers/kvm/vmx.c | |
parent | de979caacca51c929d2cc2f0f79611ee4a1bc8a5 (diff) |
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 e02c59807a7e..d1198e2b2b5d 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include "vmx.h" | 19 | #include "vmx.h" |
20 | #include "kvm_vmx.h" | 20 | #include "kvm_vmx.h" |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/kernel.h> | ||
22 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
23 | #include <linux/highmem.h> | 24 | #include <linux/highmem.h> |
24 | #include <linux/profile.h> | 25 | #include <linux/profile.h> |
@@ -75,7 +76,7 @@ static const u32 vmx_msr_index[] = { | |||
75 | #endif | 76 | #endif |
76 | MSR_EFER, MSR_K6_STAR, | 77 | MSR_EFER, MSR_K6_STAR, |
77 | }; | 78 | }; |
78 | #define NR_VMX_MSR (sizeof(vmx_msr_index) / sizeof(*vmx_msr_index)) | 79 | #define NR_VMX_MSR ARRAY_SIZE(vmx_msr_index) |
79 | 80 | ||
80 | static inline int is_page_fault(u32 intr_info) | 81 | static inline int is_page_fault(u32 intr_info) |
81 | { | 82 | { |