summaryrefslogtreecommitdiff
path: root/include/linux/jump_label.h
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2022-02-14 01:57:17 +0900
committerPeter Zijlstra <peterz@infradead.org>2022-02-16 15:57:58 +0100
commitcd27ccfc727e99352321c0c75012ab9c5a90321e (patch)
treeee9d35737e84d8e861ed3dd39487d8df92ab0af5 /include/linux/jump_label.h
parentfe65deb56e552a8c9bf7f27860dbdeac12a36116 (diff)
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
Diffstat (limited to 'include/linux/jump_label.h')
-rw-r--r--include/linux/jump_label.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h
index 6924e6837e6d..107751cc047b 100644
--- a/include/linux/jump_label.h
+++ b/include/linux/jump_label.h
@@ -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