Skip to contentSkip to conversation

jump_label: Use static_key_linked() accessor

PATCH New Borislav Petkov 2 participants 2 messages Sep 9, 2018 – Sep 10, 2018 Static branch/call

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 jump_label: Use static_key_linked() accessor

From: Borislav Petkov <[email protected]>

... instead of open-coding it, in static_key_mod().

No functional changes.

Cc Ingo Molnar <[email protected]>
Cc Josh Poimboeuf <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc "Steven Rostedt (VMware)" <[email protected]>
Cc Jason Baron <[email protected]>
---
 kernel/jump_label.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/jump_label.c +1 -1
index 2e62503bea0d..de97d8753b62 100644
@@ -455,7 +455,7 @@ struct static_key_mod {
 
 static inline struct static_key_mod *static_key_mod(struct static_key *key)
 {
-	WARN_ON_ONCE(!(key->type & JUMP_TYPE_LINKED));
+	WARN_ON_ONCE(!static_key_linked(key));
 	return (struct static_key_mod *)(key->type & ~JUMP_TYPE_MASK);
 }
 
Signature · 1 line
2.17.0.582.gccdcbd54c
#1 lore raw
jump_label: Use static_key_linked() accessor
Commit-ID:  34e12b864e617ca7e4f6a3108460aa143bf20056
Gitweb:     https://git.kernel.org/tip/34e12b864e617ca7e4f6a3108460aa143bf20056
Author:     Borislav Petkov <[email protected]>
AuthorDate: Sun, 9 Sep 2018 13:42:52 +0200
Committer:  Ingo Molnar <[email protected]>
CommitDate: Mon, 10 Sep 2018 08:23:37 +0200

jump_label: Use static_key_linked() accessor

... instead of open-coding it, in static_key_mod().

No functional changes.

Cc Andrew Morton <[email protected]>
Cc Jason Baron <[email protected]>
Cc Josh Poimboeuf <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Paul E. McKenney <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Steven Rostedt (VMware) <[email protected]>
Cc Thomas Gleixner <[email protected]>
---
 kernel/jump_label.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/jump_label.c +1 -1
index 01ebdf1f9f40..61d1c0178731 100644
@@ -455,7 +455,7 @@ struct static_key_mod {
 
 static inline struct static_key_mod *static_key_mod(struct static_key *key)
 {
-	WARN_ON_ONCE(!(key->type & JUMP_TYPE_LINKED));
+	WARN_ON_ONCE(!static_key_linked(key));
 	return (struct static_key_mod *)(key->type & ~JUMP_TYPE_MASK);
 }