From: Masahiro Yamada Date: Sun, 13 Feb 2022 16:57:16 +0000 (+0900) Subject: jump_label: Avoid unneeded casts in STATIC_KEY_INIT_{TRUE,FALSE} X-Git-Tag: v5.18-rc1~170^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fe65deb56e552a8c9bf7f27860dbdeac12a36116;p=thirdparty%2Fkernel%2Flinux.git jump_label: Avoid unneeded casts in STATIC_KEY_INIT_{TRUE,FALSE} Commit 3821fd35b58d ("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 Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20220213165717.2354046-1-masahiroy@kernel.org --- diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h index 48b9b2a82767d..6924e6837e6d9 100644 --- a/include/linux/jump_label.h +++ b/include/linux/jump_label.h @@ -251,10 +251,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 */