summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>2026-03-13 09:22:18 +0100
committerPeter Zijlstra <peterz@infradead.org>2026-03-16 13:16:48 +0100
commit428c56525bf5dbc3bd5e30014df1f5213f8bd7c8 (patch)
tree0b647315d2502a2a620eadb64b036e861e75babc /kernel
parent16df04446e34a1e7dba57f657af6ad5f51199763 (diff)
jump_label: use ATOMIC_INIT() for initialization of .enabled
Currently ATOMIC_INIT() is not used because in the past that macro was provided by linux/atomic.h which is not usable from linux/jump_label.h. However since commit 7ca8cf5347f7 ("locking/atomic: Move ATOMIC_INIT into linux/types.h") the macro only requires linux/types.h. Remove the now unnecessary workaround and the associated assertions. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://patch.msgid.link/20260313-jump_label-cleanup-v2-1-35d3c0bde549@linutronix.de
Diffstat (limited to 'kernel')
-rw-r--r--kernel/jump_label.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/kernel/jump_label.c b/kernel/jump_label.c
index 7cb19e601426..e851e4b37d0e 100644
--- a/kernel/jump_label.c
+++ b/kernel/jump_label.c
@@ -529,15 +529,6 @@ void __init jump_label_init(void)
struct static_key *key = NULL;
struct jump_entry *iter;
- /*
- * Since we are initializing the static_key.enabled field with
- * with the 'raw' int values (to avoid pulling in atomic.h) in
- * jump_label.h, let's make sure that is safe. There are only two
- * cases to check since we initialize to 0 or 1.
- */
- BUILD_BUG_ON((int)ATOMIC_INIT(0) != 0);
- BUILD_BUG_ON((int)ATOMIC_INIT(1) != 1);
-
if (static_key_initialized)
return;