Clang complains with:

backtrace.c:46:19: error: unused function 'is_32bit_vcpu' 
[-Werror,-Wunused-function]
static inline int is_32bit_vcpu(struct vcpu *vcpu)
                  ^

Fix this by guarding the function with CONFIG_COMPAT, as it's only
caller is also doing so.

Fixes: d23d792478d ('x86: avoid building COMPAT code when !HVM && !PV32')
Signed-off-by: Roger Pau MonnĂ© <[email protected]>
---
 xen/arch/x86/oprofile/backtrace.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/x86/oprofile/backtrace.c 
b/xen/arch/x86/oprofile/backtrace.c
index 929bf51a408..bd5d1b0f6ce 100644
--- a/xen/arch/x86/oprofile/backtrace.c
+++ b/xen/arch/x86/oprofile/backtrace.c
@@ -43,6 +43,7 @@ dump_hypervisor_backtrace(struct vcpu *vcpu, const struct 
frame_head *head,
     return head->ebp;
 }
 
+#ifdef CONFIG_COMPAT
 static inline int is_32bit_vcpu(struct vcpu *vcpu)
 {
     if (is_hvm_vcpu(vcpu))
@@ -50,6 +51,7 @@ static inline int is_32bit_vcpu(struct vcpu *vcpu)
     else
         return is_pv_32bit_vcpu(vcpu);
 }
+#endif
 
 static struct frame_head *
 dump_guest_backtrace(struct vcpu *vcpu, const struct frame_head *head,
-- 
2.30.1


Reply via email to