jump_label: don't export section tags
PATCH 1/1 jump_label: don't export section tags
These are supplied by the linker and only used by jump_label.c. This trivial patch moves them out of jump_label.h.
--- include/linux/jump_label.h | 3 --- kernel/jump_label.c | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-)
include/linux/jump_label.h +0 -3
@@ -132,9 +132,6 @@ static __always_inline bool static_key_true(struct static_key *key)return !arch_static_branch (key, true); } -extern const struct jump_entry __start___jump_table[]; -extern const struct jump_entry __stop___jump_table[]; -extern void jump_label_init (void );extern void jump_label_lock (void );extern void jump_label_unlock (void );
kernel/jump_label.c +4 -0
@@ -18,6 +18,10 @@#ifdef HAVE_JUMP_LABEL +/* Supplied by a linker script */ +extern struct jump_entry __start___jump_table[]; +extern struct jump_entry __stop___jump_table[]; +/* mutex to protect coming/going of the the jump_label table */ static DEFINE_MUTEX (jump_label_mutex);
Signature · 1 line
MST
Quoted 37 lines · On Fri, 10 Feb 2017 19:29:44 +0200 "Michael S. Tsirkin" <[email protected]> wrote:
These are supplied by the linker and only used by
jump_label.c. This trivial patch moves them out ofjump_label.h.Cc Jason Baron <[email protected]>Cc Peter Zijlstra <[email protected]>Cc Steven Rostedt <[email protected]>Cc Borislav Petkov <[email protected]>Cc Andrew Morton <[email protected]>Cc Linus Torvalds <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Mel Gorman <[email protected]>Cc Ingo Molnar <[email protected]>Signed-off-by Michael S. Tsirkin <[email protected]>--- include/linux/jump_label.h | 3 --- kernel/jump_label.c | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-)include/linux/jump_label.h +0
-3@@ -132,9 +132,6 @@ static __always_inline bool static_key_true(struct static_key *key)return !arch_static_branch (key, true); } -extern const struct jump_entry __start___jump_table[]; -extern const struct jump_entry __stop___jump_table[]; -extern void jump_label_init (void );extern void jump_label_lock (void );extern void jump_label_unlock (void );kernel/jump_label.c +0
-0
kernel/jump_label.c line 21
Quoted 4 lines
kernel/jump_label.c +1
-0@@ -18,6 +18,10 @@#ifdef HAVE_JUMP_LABEL +/* Supplied by a linker script */
This is common practice and obvious to anyone that does a git grep. I don't really think the comment is necessary.
But the change itself is fine.
-- Steve
Quoted 6 lines
kernel/jump_label.c +3
-0+extern struct jump_entry __start___jump_table[]; +extern struct jump_entry __stop___jump_table[]; +/* mutex to protect coming/going of the the jump_label table */ static DEFINE_MUTEX (jump_label_mutex);
Jason Baron
maintainerQuoted 23 lines · Michael S. Tsirkin
These are supplied by the linker and only used by
jump_label.c. This trivial patch moves them out ofjump_label.h.Cc Jason Baron <[email protected]>Cc Peter Zijlstra <[email protected]>Cc Steven Rostedt <[email protected]>Cc Borislav Petkov <[email protected]>Cc Andrew Morton <[email protected]>Cc Linus Torvalds <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Mel Gorman <[email protected]>Cc Ingo Molnar <[email protected]>Signed-off-by Michael S. Tsirkin <[email protected]>--- include/linux/jump_label.h | 3 --- kernel/jump_label.c | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-)include/linux/jump_label.h +0
-0
include/linux/jump_label.h static __always_inline bool static_key_true(struct static_key *key) · line 137
Quoted 9 lines
include/linux/jump_label.h +0
-3@@ -132,9 +132,6 @@ static __always_inline bool static_key_true(struct static_key *key)return !arch_static_branch (key, true); } -extern const struct jump_entry __start___jump_table[]; -extern const struct jump_entry __stop___jump_table[]; -extern void jump_label_init (void );extern void jump_label_lock (void );extern void jump_label_unlock (void );
hmmm - looks this was on top of your previous patch? Otherwise, looks good to me.
Thanks,
-Jason
Quoted 16 lines
kernel/jump_label.c +4
-0@@ -18,6 +18,10 @@#ifdef HAVE_JUMP_LABEL +/* Supplied by a linker script */ +extern struct jump_entry __start___jump_table[]; +extern struct jump_entry __stop___jump_table[]; +/* mutex to protect coming/going of the the jump_label table */ static DEFINE_MUTEX (jump_label_mutex);