From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH] kvm: compile process_smi_save_seg_64() only for x86_64 Date: Sun, 6 Sep 2015 16:22:32 +0200 Message-ID: <55EC4C28.6070705@redhat.com> References: <1441546541-20849-1-git-send-email-kuleshovmail@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org To: Alexander Kuleshov , Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:38216 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752305AbbIFOWg (ORCPT ); Sun, 6 Sep 2015 10:22:36 -0400 In-Reply-To: <1441546541-20849-1-git-send-email-kuleshovmail@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On 06/09/2015 15:35, Alexander Kuleshov wrote: > 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: >=20 > arch/x86/kvm/x86.c:5946:13: warning: =E2=80=98process_smi_save_seg_64= =E2=80=99 defined but not used [-Wunused-function] > static void process_smi_save_seg_64(struct kvm_vcpu *vcpu, char *buf= , int n) > ^ >=20 > Signed-off-by: Alexander Kuleshov > --- > arch/x86/kvm/x86.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index 1e7e76e..a60bdbc 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -5943,6 +5943,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)); > } > =20 > +#ifdef CONFIG_X86_64 > static void process_smi_save_seg_64(struct kvm_vcpu *vcpu, char *buf= , int n) > { > struct kvm_segment seg; > @@ -5958,6 +5959,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 > =20 > static void process_smi_save_state_32(struct kvm_vcpu *vcpu, char *b= uf) > { >=20 Applied, thanks. Paolo