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>
This commit is contained in:
committed by
Jakub Kicinski
parent
c2c60ea37e
commit
7071732c26
@ -4942,7 +4942,7 @@ void netdev_info(const struct net_device *dev, const char *format, ...);
|
|||||||
|
|
||||||
#define netdev_level_once(level, dev, fmt, ...) \
|
#define netdev_level_once(level, dev, fmt, ...) \
|
||||||
do { \
|
do { \
|
||||||
static bool __print_once __read_mostly; \
|
static bool __section(".data.once") __print_once; \
|
||||||
\
|
\
|
||||||
if (!__print_once) { \
|
if (!__print_once) { \
|
||||||
__print_once = true; \
|
__print_once = true; \
|
||||||
|
Reference in New Issue
Block a user