mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 05:44:11 +00:00
jump_label: Refactor #ifdef of struct static_key
Move #ifdef CONFIG_JUMP_LABEL inside the struct static_key. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20220213165717.2354046-2-masahiroy@kernel.org
This commit is contained in:
parent
fe65deb56e
commit
cd27ccfc72
1 changed files with 2 additions and 7 deletions
|
@ -82,10 +82,9 @@ extern bool static_key_initialized;
|
|||
"%s(): static key '%pS' used before call to jump_label_init()", \
|
||||
__func__, (key))
|
||||
|
||||
#ifdef CONFIG_JUMP_LABEL
|
||||
|
||||
struct static_key {
|
||||
atomic_t enabled;
|
||||
#ifdef CONFIG_JUMP_LABEL
|
||||
/*
|
||||
* Note:
|
||||
* To make anonymous unions work with old compilers, the static
|
||||
|
@ -104,13 +103,9 @@ struct static_key {
|
|||
struct jump_entry *entries;
|
||||
struct static_key_mod *next;
|
||||
};
|
||||
#endif /* CONFIG_JUMP_LABEL */
|
||||
};
|
||||
|
||||
#else
|
||||
struct static_key {
|
||||
atomic_t enabled;
|
||||
};
|
||||
#endif /* CONFIG_JUMP_LABEL */
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#ifdef CONFIG_JUMP_LABEL
|
||||
|
|
Loading…
Reference in a new issue