Skip to content

Commit cd27ccf

Browse files
masahir0yPeter Zijlstra
authored andcommitted
jump_label: Refactor #ifdef of struct static_key
Move #ifdef CONFIG_JUMP_LABEL inside the struct static_key. Signed-off-by: Masahiro Yamada <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent fe65deb commit cd27ccf

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

include/linux/jump_label.h

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,9 @@ extern bool static_key_initialized;
8282
"%s(): static key '%pS' used before call to jump_label_init()", \
8383
__func__, (key))
8484

85-
#ifdef CONFIG_JUMP_LABEL
86-
8785
struct static_key {
8886
atomic_t enabled;
87+
#ifdef CONFIG_JUMP_LABEL
8988
/*
9089
* Note:
9190
* To make anonymous unions work with old compilers, the static
@@ -104,13 +103,9 @@ struct static_key {
104103
struct jump_entry *entries;
105104
struct static_key_mod *next;
106105
};
106+
#endif /* CONFIG_JUMP_LABEL */
107107
};
108108

109-
#else
110-
struct static_key {
111-
atomic_t enabled;
112-
};
113-
#endif /* CONFIG_JUMP_LABEL */
114109
#endif /* __ASSEMBLY__ */
115110

116111
#ifdef CONFIG_JUMP_LABEL

0 commit comments

Comments
 (0)