summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kuleshov2015-09-06 15:35:41 +0200
committerPaolo Bonzini2015-09-06 16:26:22 +0200
commitefbb288afc2f3079fa5e9308f4d9d06a390babdc (patch)
treec676b45bb610a642575a2460a0589b4e5af2f01c
parentKVM: x86: avoid uninitialized variable warning (diff)
downloadkernel-qcow2-linux-efbb288afc2f3079fa5e9308f4d9d06a390babdc.tar.gz
kernel-qcow2-linux-efbb288afc2f3079fa5e9308f4d9d06a390babdc.tar.xz
kernel-qcow2-linux-efbb288afc2f3079fa5e9308f4d9d06a390babdc.zip
kvm: compile process_smi_save_seg_64() only for x86_64
The process_smi_save_seg_64() function called only in the process_smi_save_state_64() if the CONFIG_X86_64 is set. This patch adds #ifdef CONFIG_X86_64 around process_smi_save_seg_64() to prevent following warning message: arch/x86/kvm/x86.c:5946:13: warning: ‘process_smi_save_seg_64’ defined but not used [-Wunused-function] static void process_smi_save_seg_64(struct kvm_vcpu *vcpu, char *buf, int n) ^ Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--arch/x86/kvm/x86.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index c7b6aed998e9..13728dbdbb56 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -5955,6 +5955,7 @@ static void process_smi_save_seg_32(struct kvm_vcpu *vcpu, char *buf, int n)
put_smstate(u32, buf, offset, process_smi_get_segment_flags(&seg));
}
+#ifdef CONFIG_X86_64
static void process_smi_save_seg_64(struct kvm_vcpu *vcpu, char *buf, int n)
{
struct kvm_segment seg;
@@ -5970,6 +5971,7 @@ static void process_smi_save_seg_64(struct kvm_vcpu *vcpu, char *buf, int n)
put_smstate(u32, buf, offset + 4, seg.limit);
put_smstate(u64, buf, offset + 8, seg.base);
}
+#endif
static void process_smi_save_state_32(struct kvm_vcpu *vcpu, char *buf)
{