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

net: use .data.once section in netdev_level_once()

Same rationale than prior patch : using the dedicated
section avoid holes and pack all these bool values.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Eric Dumazet and committed by
Jakub Kicinski
7071732c c2c60ea3

+1 -1
+1 -1
include/linux/netdevice.h
··· 4942 4942 4943 4943 #define netdev_level_once(level, dev, fmt, ...) \ 4944 4944 do { \ 4945 - static bool __print_once __read_mostly; \ 4945 + static bool __section(".data.once") __print_once; \ 4946 4946 \ 4947 4947 if (!__print_once) { \ 4948 4948 __print_once = true; \