Skip to content

Commit fe65deb

Browse files
masahir0yPeter Zijlstra
authored andcommitted
jump_label: Avoid unneeded casts in STATIC_KEY_INIT_{TRUE,FALSE}
Commit 3821fd3 ("jump_label: Reduce the size of struct static_key") introduced the union to struct static_key. It is more natual to set JUMP_TYPE_* to the .type field without casting. 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-1-masahiroy@kernel.org
1 parent fb7275a commit fe65deb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/linux/jump_label.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,10 @@ extern void static_key_disable_cpuslocked(struct static_key *key);
251251
*/
252252
#define STATIC_KEY_INIT_TRUE \
253253
{ .enabled = { 1 }, \
254-
{ .entries = (void *)JUMP_TYPE_TRUE } }
254+
{ .type = JUMP_TYPE_TRUE } }
255255
#define STATIC_KEY_INIT_FALSE \
256256
{ .enabled = { 0 }, \
257-
{ .entries = (void *)JUMP_TYPE_FALSE } }
257+
{ .type = JUMP_TYPE_FALSE } }
258258

259259
#else /* !CONFIG_JUMP_LABEL */
260260

0 commit comments

Comments
 (0)