From: Arnd Bergmann <arnd@arndb.de>
To: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
x86@kernel.org, Josh Poimboeuf <jpoimboe@redhat.com>,
Miroslav Benes <mbenes@suse.cz>
Cc: Arnd Bergmann <arnd@arndb.de>, Ingo Molnar <mingo@kernel.org>,
Andy Lutomirski <luto@kernel.org>, Dave Jones <dsj@fb.com>,
Jann Horn <jannh@google.com>,
Peter Zijlstra <peterz@infradead.org>,
Vince Weaver <vincent.weaver@maine.edu>,
"H. Peter Anvin" <hpa@zytor.com>,
Shile Zhang <shile.zhang@linux.alibaba.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] x86/unwind/orc: fix unused function warnings
Date: Tue, 28 Apr 2020 23:36:09 +0200 [thread overview]
Message-ID: <20200428213618.3587684-1-arnd@arndb.de> (raw)
Without CONFIG_MODULES, these two variables are unused:
arch/x86/kernel/unwind_orc.c:29:26: error: 'cur_orc_table' defined but not used [-Werror=unused-variable]
29 | static struct orc_entry *cur_orc_table = __start_orc_unwind;
| ^~~~~~~~~~~~~
arch/x86/kernel/unwind_orc.c:28:13: error: 'cur_orc_ip_table' defined but not used [-Werror=unused-variable]
28 | static int *cur_orc_ip_table = __start_orc_unwind_ip;
| ^~~~~~~~~~~~~~~~
Move them into the #ifdef section.
Fixes: 153eb2223c79 ("x86/unwind/orc: Convert global variables to static")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/x86/kernel/unwind_orc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/unwind_orc.c b/arch/x86/kernel/unwind_orc.c
index 0ebc11a8bb45..ea8f2aba663f 100644
--- a/arch/x86/kernel/unwind_orc.c
+++ b/arch/x86/kernel/unwind_orc.c
@@ -25,8 +25,6 @@ static bool orc_init __ro_after_init;
static unsigned int lookup_num_blocks __ro_after_init;
static DEFINE_MUTEX(sort_mutex);
-static int *cur_orc_ip_table = __start_orc_unwind_ip;
-static struct orc_entry *cur_orc_table = __start_orc_unwind;
static inline unsigned long orc_ip(const int *ip)
{
@@ -191,6 +189,8 @@ static struct orc_entry *orc_find(unsigned long ip)
}
#ifdef CONFIG_MODULES
+static int *cur_orc_ip_table = __start_orc_unwind_ip;
+static struct orc_entry *cur_orc_table = __start_orc_unwind;
static void orc_sort_swap(void *_a, void *_b, int size)
{
--
2.26.0
next reply other threads:[~2020-04-28 21:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-28 21:36 Arnd Bergmann [this message]
2020-04-28 21:43 ` Josh Poimboeuf
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=20200428213618.3587684-1-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=bp@alien8.de \
--cc=dsj@fb.com \
--cc=hpa@zytor.com \
--cc=jannh@google.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mbenes@suse.cz \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=shile.zhang@linux.alibaba.com \
--cc=tglx@linutronix.de \
--cc=vincent.weaver@maine.edu \
--cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®