path: root/kernel/jump_label.c
diff options
authorJason Baron <>2012-02-28 13:49:01 -0500
committerIngo Molnar <>2012-02-28 20:01:08 +0100
commit8eedce996556d7d06522cd3a0e6069141c8dffe0 (patch)
tree1b24c85bd91fed430b3fbdec195fc1d35751e28f /kernel/jump_label.c
parenta706d4fc9e56d8e46393533e0cdca2d35fa5c7e5 (diff)
static keys: Inline the static_key_enabled() function
In the jump label enabled case, calling static_key_enabled() results in a function call. The function returns the results of a compare, so it really doesn't need the overhead of a full function call. Let's make it 'static inline' for both the jump label enabled and disabled cases. Signed-off-by: Jason Baron <> Cc: Cc: Cc: Cc: Andrew Morton <> Cc: Linus Torvalds <> Link: Signed-off-by: Ingo Molnar <>
Diffstat (limited to 'kernel/jump_label.c')
1 files changed, 0 insertions, 6 deletions
diff --git a/kernel/jump_label.c b/kernel/jump_label.c
index bf9dcadbb53a..43049192b5ec 100644
--- a/kernel/jump_label.c
+++ b/kernel/jump_label.c
@@ -29,12 +29,6 @@ void jump_label_unlock(void)
-bool static_key_enabled(struct static_key *key)
- return (atomic_read(&key->enabled) > 0);
static int jump_label_cmp(const void *a, const void *b)
const struct jump_entry *jea = a;