Skip to content

Commit fb9cbbc

Browse files
jpoimboeIngo Molnar
authored andcommitted
x86/unwind/orc: Move ORC sorting variables under !CONFIG_MODULES
Fix the following warnings seen with !CONFIG_MODULES: arch/x86/kernel/unwind_orc.c:29:26: warning: 'cur_orc_table' defined but not used [-Wunused-variable] 29 | static struct orc_entry *cur_orc_table = __start_orc_unwind; | ^~~~~~~~~~~~~ arch/x86/kernel/unwind_orc.c:28:13: warning: 'cur_orc_ip_table' defined but not used [-Wunused-variable] 28 | static int *cur_orc_ip_table = __start_orc_unwind_ip; | ^~~~~~~~~~~~~~~~ Fixes: 153eb22 ("x86/unwind/orc: Convert global variables to static") Reported-by: Stephen Rothwell <[email protected]> Signed-off-by: Josh Poimboeuf <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Linux Next Mailing List <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/r/20200428071640.psn5m7eh3zt2in4v@treble
1 parent c84cb37 commit fb9cbbc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

arch/x86/kernel/unwind_orc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ extern struct orc_entry __stop_orc_unwind[];
2424
static bool orc_init __ro_after_init;
2525
static unsigned int lookup_num_blocks __ro_after_init;
2626

27-
static DEFINE_MUTEX(sort_mutex);
28-
static int *cur_orc_ip_table = __start_orc_unwind_ip;
29-
static struct orc_entry *cur_orc_table = __start_orc_unwind;
30-
3127
static inline unsigned long orc_ip(const int *ip)
3228
{
3329
return (unsigned long)ip + *ip;
@@ -192,6 +188,10 @@ static struct orc_entry *orc_find(unsigned long ip)
192188

193189
#ifdef CONFIG_MODULES
194190

191+
static DEFINE_MUTEX(sort_mutex);
192+
static int *cur_orc_ip_table = __start_orc_unwind_ip;
193+
static struct orc_entry *cur_orc_table = __start_orc_unwind;
194+
195195
static void orc_sort_swap(void *_a, void *_b, int size)
196196
{
197197
struct orc_entry *orc_a, *orc_b;

0 commit comments

Comments
 (0)