Skip to contentSkip to conversation

x86/jump_label: Make tp_vec_nr static

PATCH New YueHaibing 2 participants 2 messages Jun 25, 2019

Subsystems (2)
lore
Share & tools
lore

YueHaibing

author
#0 lore raw

PATCH 1/1 x86/jump_label: Make tp_vec_nr static

Fix sparse warning:

arch/x86/kernel/jump_label.c:106:5: warning:
symbol 'tp_vec_nr' was not declared. Should it be static?

It's only used in jump_label.c, so make it static.

---
 arch/x86/kernel/jump_label.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/jump_label.c +1 -1
index ea13808..0440532 100644
@@ -103,7 +103,7 @@ void arch_jump_label_transform(struct jump_entry *entry,
 
 #define TP_VEC_MAX (PAGE_SIZE / sizeof(struct text_poke_loc))
 static struct text_poke_loc tp_vec[TP_VEC_MAX];
-int tp_vec_nr = 0;
+static int tp_vec_nr;
 
 bool arch_jump_label_transform_queue(struct jump_entry *entry,
 				     enum jump_label_type type)
Signature · 1 line
2.7.4
#1 lore raw
x86/jump_label: Make tp_vec_nr static
Commit-ID:  bf10c97adbd0dc8fa65c35d5b0c0dc281a68ac8e
Gitweb:     https://git.kernel.org/tip/bf10c97adbd0dc8fa65c35d5b0c0dc281a68ac8e
Author:     YueHaibing <[email protected]>
AuthorDate: Tue, 25 Jun 2019 11:45:48 +0800
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Tue, 25 Jun 2019 09:22:14 +0200

x86/jump_label: Make tp_vec_nr static

Fix sparse warning:

arch/x86/kernel/jump_label.c:106:5: warning:
symbol 'tp_vec_nr' was not declared. Should it be static?

It's only used in jump_label.c, so make it static.

---
 arch/x86/kernel/jump_label.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/jump_label.c +1 -1
index ea13808bf6da..044053235302 100644
@@ -103,7 +103,7 @@ void arch_jump_label_transform(struct jump_entry *entry,
 
 #define TP_VEC_MAX (PAGE_SIZE / sizeof(struct text_poke_loc))
 static struct text_poke_loc tp_vec[TP_VEC_MAX];
-int tp_vec_nr = 0;
+static int tp_vec_nr;
 
 bool arch_jump_label_transform_queue(struct jump_entry *entry,
 				     enum jump_label_type type)