Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

jump_label: remove workaround for old compilers in initializations

The extra braces for the initialization of the anonymous union members
were added in commit cd8d860dcce9 ("jump_label: Fix anonymous union
initialization") to compensate for limitations in gcc < 4.6.

Versions of gcc this old are not supported anymore,
so drop the workaround.

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-2-35d3c0bde549@linutronix.de

authored by

Thomas Weißschuh and committed by
Peter Zijlstra
acb38872 428c5652

+2 -9
+2 -9
include/linux/jump_label.h
··· 87 87 atomic_t enabled; 88 88 #ifdef CONFIG_JUMP_LABEL 89 89 /* 90 - * Note: 91 - * To make anonymous unions work with old compilers, the static 92 - * initialization of them requires brackets. This creates a dependency 93 - * on the order of the struct with the initializers. If any fields 94 - * are added, STATIC_KEY_INIT_TRUE and STATIC_KEY_INIT_FALSE may need 95 - * to be modified. 96 - * 97 90 * bit 0 => 1 if key is initially true 98 91 * 0 if initially false 99 92 * bit 1 => 1 if points to struct static_key_mod ··· 233 240 234 241 #define STATIC_KEY_INIT_TRUE \ 235 242 { .enabled = ATOMIC_INIT(1), \ 236 - { .type = JUMP_TYPE_TRUE } } 243 + .type = JUMP_TYPE_TRUE } 237 244 #define STATIC_KEY_INIT_FALSE \ 238 245 { .enabled = ATOMIC_INIT(0), \ 239 - { .type = JUMP_TYPE_FALSE } } 246 + .type = JUMP_TYPE_FALSE } 240 247 241 248 #else /* !CONFIG_JUMP_LABEL */ 242 249