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.
Showing the changes to kernel (1 of 2 files). Show all
Unified · Split
| @@ -29,12 +29,6 @@ void jump_label_unlock(void) · 28 unmodified lines | |||
| 29 | mutex_unlock(&jump_label_mutex); | 29 | mutex_unlock(&jump_label_mutex); |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | bool static_key_enabled(struct static_key *key) | ||
| 33 | { | ||
| 34 | return (atomic_read(&key->enabled) > 0); | ||
| 35 | } | ||
| 36 | EXPORT_SYMBOL_GPL(static_key_enabled); | ||
| 37 | |||
| 38 | static int jump_label_cmp(const void *a, const void *b) | 32 | static int jump_label_cmp(const void *a, const void *b) |
| 39 | { | 33 | { |
| 40 | const struct jump_entry *jea = a; | 34 | const struct jump_entry *jea = a; |