deprecate static_branch()
Subsystems (2)
cover deprecate static_branch()
Hi,
Enough time has passed since the static_branch() -> static_key_false() transition. Remove the last user of static_branch(), and kill off static_branch().
Thanks,
-Jason
Jason Baron (2):
tracepoint: use static_key_false(), since static_branch() is
deprecated
jump label: remove static_branch()
include/linux/jump_label.h | 17 +---------------- include/linux/tracepoint.h | 2 +- 2 files changed, 2 insertions(+), 17 deletions(-)
PATCH 1/2 tracepoint: use static_key_false(), since static_branch() is deprecated
Convert last user of static_branch() -> static_key_false().
--- include/linux/tracepoint.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/linux/tracepoint.h +1 -1
@@ -153,7 +153,7 @@ static inline void tracepoint_synchronize_unregister(void) } \ static inline void trace_##name##_rcuidle(proto) \ { \ - if (static_branch(&__tracepoint_##name.key)) \ + if (static_key_false(&__tracepoint_##name.key)) \ __DO_TRACE(&__tracepoint_##name, \ TP_PROTO(data_proto), \ TP_ARGS(data_args), \
Signature · 1 line
1.7.1
[tip:perf/core] tracepoint: Use static_key_false(), since static_branch() is deprecated
Commit-ID: 326f418b4c74ab4a6066f38b6144bc6461f9447b Gitweb: http://git.kernel.org/tip/326f418b4c74ab4a6066f38b6144bc6461f9447b Author: Jason Baron <[email protected]> AuthorDate: Thu, 28 Jun 2012 15:04:57 -0400 Committer: Ingo Molnar <[email protected]> CommitDate: Fri, 6 Jul 2012 10:53:49 +0200
tracepoint: Use static_key_false(), since static_branch() is deprecated
Convert the last user of static_branch() -> static_key_false().
--- include/linux/tracepoint.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/linux/tracepoint.h +1 -1
@@ -153,7 +153,7 @@ static inline void tracepoint_synchronize_unregister(void) } \ static inline void trace_##name##_rcuidle(proto) \ { \ - if (static_branch(&__tracepoint_##name.key)) \ + if (static_key_false(&__tracepoint_##name.key)) \ __DO_TRACE(&__tracepoint_##name, \ TP_PROTO(data_proto), \ TP_ARGS(data_args), \
PATCH 2/2 jump label: remove static_branch()
In reply to Jason BaronRemove static_branch(), since interface is now static_key_false()/true(). See commit:
c5905afb0ee6550b42c49213da1c22d67316c194 static keys: Introduce 'struct static_key', static_key_true()/false() and static_key_slow_[inc|dec]()
--- include/linux/jump_label.h | 17 +---------------- 1 files changed, 1 insertions(+), 16 deletions(-)
include/linux/jump_label.h +1 -16
@@ -42,8 +42,7 @@* allowed. * * Not initializing the key (static data is initialized to 0s anyway) is the -* same as using STATIC_KEY_INIT_FALSE and static_key_false() is -* equivalent with static_branch(). +* same as using STATIC_KEY_INIT_FALSE. * */
@@ -107,12 +106,6 @@ static __always_inline bool static_key_true(struct static_key *key)return !static_key_false (key); } -/* Deprecated. Please use 'static_key_false() instead. */ -static __always_inline bool static_branch(struct static_key *key) -{ -return arch_static_branch (key); -} -extern struct jump_entry __start___jump_table[];extern struct jump_entry __stop___jump_table[];
@@ -166,14 +159,6 @@ static __always_inline bool static_key_true(struct static_key *key)return false; } -/* Deprecated. Please use 'static_key_false() instead. */ -static __always_inline bool static_branch(struct static_key *key) -{ -if (unlikely (atomic_read (&key->enabled)) >0 ) -return true; -return false; -} -static inline void static_key_slow_inc (struct static_key *key) {atomic_inc (&key->enabled);
Signature · 1 line
1.7.1
[tip:perf/core] jump label: Remove static_branch()
Commit-ID: 47fbc518a4b5c9a949f7cab8b14a00d3549bf138 Gitweb: http://git.kernel.org/tip/47fbc518a4b5c9a949f7cab8b14a00d3549bf138 Author: Jason Baron <[email protected]> AuthorDate: Thu, 28 Jun 2012 15:05:02 -0400 Committer: Ingo Molnar <[email protected]> CommitDate: Fri, 6 Jul 2012 10:53:49 +0200
jump label: Remove static_branch()
Remove the obsolete static_branch() interface, since the supported interface is now static_key_false()/true() - which is used by all in-tree code.
See commit:
c5905afb0e ("static keys: Introduce 'struct static_key', static_key_true()/false() and static_key_slow_[inc|dec]()").
--- include/linux/jump_label.h | 17 +---------------- 1 files changed, 1 insertions(+), 16 deletions(-)
include/linux/jump_label.h +1 -16
@@ -42,8 +42,7 @@* allowed. * * Not initializing the key (static data is initialized to 0s anyway) is the -* same as using STATIC_KEY_INIT_FALSE and static_key_false() is -* equivalent with static_branch(). +* same as using STATIC_KEY_INIT_FALSE. * */
@@ -107,12 +106,6 @@ static __always_inline bool static_key_true(struct static_key *key)return !static_key_false (key); } -/* Deprecated. Please use 'static_key_false() instead. */ -static __always_inline bool static_branch(struct static_key *key) -{ -return arch_static_branch (key); -} -extern struct jump_entry __start___jump_table[];extern struct jump_entry __stop___jump_table[];
@@ -166,14 +159,6 @@ static __always_inline bool static_key_true(struct static_key *key)return false; } -/* Deprecated. Please use 'static_key_false() instead. */ -static __always_inline bool static_branch(struct static_key *key) -{ -if (unlikely (atomic_read (&key->enabled)) >0 ) -return true; -return false; -} -static inline void static_key_slow_inc (struct static_key *key) {atomic_inc (&key->enabled);