Skip to contentSkip to conversation

x86/unwind/orc: make some symbols static

PATCH In review Jason Yan 3 participants 3 messages Apr 13, 2020 – Apr 14, 2020

Subsystems (2)
lore
Share & tools
lore

Jason Yan

author
#0 lore raw

PATCH 1/1 x86/unwind/orc: make some symbols static

Fix the following sparse warning:

arch/x86/kernel/unwind_orc.c:19:5: warning: symbol 'cur_orc_ip_table' was not declared. Should it be static? arch/x86/kernel/unwind_orc.c:20:18: warning: symbol 'cur_orc_table' was not declared. Should it be static? arch/x86/kernel/unwind_orc.c:22:14: warning: symbol 'lookup_num_blocks' was not declared. Should it be static? arch/x86/kernel/unwind_orc.c:23:6: warning: symbol 'orc_init' was not declared. Should it be static?

---
 arch/x86/kernel/unwind_orc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/x86/kernel/unwind_orc.c +4 -4
index e9cc182aa97e..0dbabc469ce2 100644
@@ -16,11 +16,11 @@ extern struct orc_entry __start_orc_unwind[];
 extern struct orc_entry __stop_orc_unwind[];
 
 static DEFINE_MUTEX(sort_mutex);
-int *cur_orc_ip_table = __start_orc_unwind_ip;
-struct orc_entry *cur_orc_table = __start_orc_unwind;
+static int *cur_orc_ip_table = __start_orc_unwind_ip;
+static struct orc_entry *cur_orc_table = __start_orc_unwind;
 
-unsigned int lookup_num_blocks;
-bool orc_init;
+static unsigned int lookup_num_blocks;
+static bool orc_init;
 
 static inline unsigned long orc_ip(const int *ip)
 {
Signature · 1 line
2.21.1
#1 lore raw
Quoted 28 lines · Jason Yan

Fix the following sparse warning:

arch/x86/kernel/unwind_orc.c:19:5: warning: symbol 'cur_orc_ip_table' was not declared. Should it be static? arch/x86/kernel/unwind_orc.c:20:18: warning: symbol 'cur_orc_table' was not declared. Should it be static? arch/x86/kernel/unwind_orc.c:22:14: warning: symbol 'lookup_num_blocks' was not declared. Should it be static? arch/x86/kernel/unwind_orc.c:23:6: warning: symbol 'orc_init' was not declared. Should it be static?

---
 arch/x86/kernel/unwind_orc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/x86/kernel/unwind_orc.c +0 -2
index e9cc182aa97e..0dbabc469ce2 100644
@@ -16,11 +16,11 @@ extern struct orc_entry __start_orc_unwind[];
 extern struct orc_entry __stop_orc_unwind[];
 
 static DEFINE_MUTEX(sort_mutex);
-int *cur_orc_ip_table = __start_orc_unwind_ip;
-struct orc_entry *cur_orc_table = __start_orc_unwind;

arch/x86/kernel/unwind_orc.c extern struct orc_entry __start_orc_unwind[]; · line 26

Quoted 10 lines
arch/x86/kernel/unwind_orc.c +4 -2
+static int *cur_orc_ip_table = __start_orc_unwind_ip;
+static struct orc_entry *cur_orc_table = __start_orc_unwind;
 
-unsigned int lookup_num_blocks;
-bool orc_init;
+static unsigned int lookup_num_blocks;
+static bool orc_init;
 
 static inline unsigned long orc_ip(const int *ip)
 {

Thanks for the patch, but Josh already fixed it in
https://lore.kernel.org/lkml/63b5cab2e28b9c08854fc57f5b512a9ccf76ad95.1584033751.git.jpoimboe@redhat.com/

Josh, any plans to add the patch set into the current queue?

Miroslav

#2 lore raw
Quoted 37 lines · Miroslav Benes
Quoted 35 lines · Jason Yan

Fix the following sparse warning:

arch/x86/kernel/unwind_orc.c:19:5: warning: symbol 'cur_orc_ip_table' was not declared. Should it be static? arch/x86/kernel/unwind_orc.c:20:18: warning: symbol 'cur_orc_table' was not declared. Should it be static? arch/x86/kernel/unwind_orc.c:22:14: warning: symbol 'lookup_num_blocks' was not declared. Should it be static? arch/x86/kernel/unwind_orc.c:23:6: warning: symbol 'orc_init' was not declared. Should it be static?

---
 arch/x86/kernel/unwind_orc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/x86/kernel/unwind_orc.c +4 -4
index e9cc182aa97e..0dbabc469ce2 100644
@@ -16,11 +16,11 @@ extern struct orc_entry __start_orc_unwind[];
 extern struct orc_entry __stop_orc_unwind[];
 
 static DEFINE_MUTEX(sort_mutex);
-int *cur_orc_ip_table = __start_orc_unwind_ip;
-struct orc_entry *cur_orc_table = __start_orc_unwind;
+static int *cur_orc_ip_table = __start_orc_unwind_ip;
+static struct orc_entry *cur_orc_table = __start_orc_unwind;
 
-unsigned int lookup_num_blocks;
-bool orc_init;
+static unsigned int lookup_num_blocks;
+static bool orc_init;
 
Quoted 8 lines

arch/x86/kernel/unwind_orc.c extern struct orc_entry __start_orc_unwind[]; · line 26

Quoted 3 lines
arch/x86/kernel/unwind_orc.c +0 -0
 static inline unsigned long orc_ip(const int *ip)
 {

Thanks for the patch, but Josh already fixed it in
https://lore.kernel.org/lkml/63b5cab2e28b9c08854fc57f5b512a9ccf76ad95.1584033751.git.jpoimboe@redhat.com/

Josh, any plans to add the patch set into the current queue?

Yeah, I have a v2 coming one of these days...

Signature · 1 line
Josh