aboutsummaryrefslogtreecommitdiff
path: root/drivers/kvm/kvm_svm.h
diff options
context:
space:
mode:
authorAhmed S. Darwish <darwish.07@gmail.com>2007-02-19 14:37:46 +0200
committerAvi Kivity <avi@qumranet.com>2007-03-04 11:12:39 +0200
commit9d8f549dc69b1fc65d0b03916c02f12ca49b3ea0 (patch)
tree938b47ff9c507b266ea57713cc2233b59b6850df /drivers/kvm/kvm_svm.h
parentde979caacca51c929d2cc2f0f79611ee4a1bc8a5 (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/kvm_svm.h')
-rw-r--r--drivers/kvm/kvm_svm.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/kvm/kvm_svm.h b/drivers/kvm/kvm_svm.h
index 74cc862f493..624f1ca4865 100644
--- a/drivers/kvm/kvm_svm.h
+++ b/drivers/kvm/kvm_svm.h
@@ -1,6 +1,7 @@
#ifndef __KVM_SVM_H
#define __KVM_SVM_H
+#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/list.h>
#include <asm/msr.h>
@@ -18,7 +19,7 @@ static const u32 host_save_msrs[] = {
MSR_IA32_LASTBRANCHTOIP, MSR_IA32_LASTINTFROMIP,MSR_IA32_LASTINTTOIP,*/
};
-#define NR_HOST_SAVE_MSRS (sizeof(host_save_msrs) / sizeof(*host_save_msrs))
+#define NR_HOST_SAVE_MSRS ARRAY_SIZE(host_save_msrs)
#define NUM_DB_REGS 4
struct vcpu_svm {