Merge tag 'platform-drivers-x86-v5.18-1' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-block.git] / include / linux / jump_label.h
index 48b9b2a82767d74ec95f102ab1470f5fa79cc97d..107751cc047be54758b29e61cefbaabf0c9ee595 100644 (file)
@@ -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
@@ -251,10 +246,10 @@ extern void static_key_disable_cpuslocked(struct static_key *key);
  */
 #define STATIC_KEY_INIT_TRUE                                   \
        { .enabled = { 1 },                                     \
-         { .entries = (void *)JUMP_TYPE_TRUE } }
+         { .type = JUMP_TYPE_TRUE } }
 #define STATIC_KEY_INIT_FALSE                                  \
        { .enabled = { 0 },                                     \
-         { .entries = (void *)JUMP_TYPE_FALSE } }
+         { .type = JUMP_TYPE_FALSE } }
 
 #else  /* !CONFIG_JUMP_LABEL */