mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-08 15:04:45 +00:00
jump_label: Avoid unneeded casts in STATIC_KEY_INIT_{TRUE,FALSE}
Commit 3821fd35b5
("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
This commit is contained in:
parent
fb7275acd6
commit
fe65deb56e
@ -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 */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user