kvm: compile process_smi_save_seg_64() only for x86_64
PATCH 1/1 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)
^
--- arch/x86/kvm/x86.c | 2 ++ 1 file changed, 2 insertions(+)
arch/x86/kvm/x86.c +2 -0
@@ -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)); } +#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 static void process_smi_save_state_32 (struct kvm_vcpu *vcpu,char *buf) {
Signature · 1 line
2.5.0
Quoted 28 lines · Alexander Kuleshov
The
process_smi_save_seg_64()function called only in theprocess_smi_save_state_64()if theCONFIG_X86_64is set. This patch adds #ifdefCONFIG_X86_64aroundprocess_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 voidprocess_smi_save_seg_64(struct kvm_vcpu *vcpu, char *buf, int n)^Signed-off-by Alexander Kuleshov <[email protected]>--- arch/x86/kvm/x86.c | 2 ++ 1 file changed, 2 insertions(+)arch/x86/kvm/x86.c +1
-0@@ -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)); } +#ifdef CONFIG_X86_64 static void process_smi_save_seg_64 (struct kvm_vcpu *vcpu,char *buf,int n) {struct kvm_segment seg;
arch/x86/kvm/x86.c static void process_smi_save_seg_64(struct kvm_vcpu *vcpu, char *buf, int n) · line 5965
Quoted 7 lines
arch/x86/kvm/x86.c +1
-0@@ -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 static void process_smi_save_state_32 (struct kvm_vcpu *vcpu,char *buf) {
Applied, thanks.
Paolo