From: Roger Pau Monne <roger.pau@citrix.com>
To: <xen-devel@lists.xenproject.org>
Cc: Roger Pau Monne <roger.pau@citrix.com>,
Jan Beulich <jbeulich@suse.com>,
Andrew Cooper <andrew.cooper3@citrix.com>, Wei Liu <wl@xen.org>
Subject: [PATCH 1/2] x86/oprofile: fix oprofile for clang build
Date: Fri, 23 Apr 2021 11:43:42 +0200 [thread overview]
Message-ID: <20210423094343.5850-2-roger.pau@citrix.com> (raw)
In-Reply-To: <20210423094343.5850-1-roger.pau@citrix.com>
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é <roger.pau@citrix.com>
---
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
next prev parent reply other threads:[~2021-04-23 9:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-23 9:43 [PATCH 0/2] x86/clang: build fixes Roger Pau Monne
2021-04-23 9:43 ` Roger Pau Monne [this message]
2021-04-23 9:45 ` [PATCH 1/2] x86/oprofile: fix oprofile for clang build Jan Beulich
2021-04-23 9:43 ` [PATCH 2/2] x86/pv: fix clang build without CONFIG_PV32 Roger Pau Monne
2021-04-23 9:46 ` Roger Pau Monné
2021-04-23 9:48 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210423094343.5850-2-roger.pau@citrix.com \
--to=roger.pau@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.