Skip to content

Commit ce3fdb6

Browse files
JoePerchesdavem330
authored andcommitted
netdevice.h: Add __cold to netdev_<level> logging functions
Add __cold to the netdev_<level> logging functions similar to the use of __cold in the generic printk function. Using __cold moves all the netdev_<level> logging functions out-of-line possibly improving code locality and runtime performance. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent ff7653f commit ce3fdb6

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎include/linux/netdevice.h‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4663,22 +4663,22 @@ static inline const char *netdev_reg_state(const struct net_device *dev)
46634663
return " (unknown)";
46644664
}
46654665

4666-
__printf(3, 4)
4666+
__printf(3, 4) __cold
46674667
void netdev_printk(const char *level, const struct net_device *dev,
46684668
const char *format, ...);
4669-
__printf(2, 3)
4669+
__printf(2, 3) __cold
46704670
void netdev_emerg(const struct net_device *dev, const char *format, ...);
4671-
__printf(2, 3)
4671+
__printf(2, 3) __cold
46724672
void netdev_alert(const struct net_device *dev, const char *format, ...);
4673-
__printf(2, 3)
4673+
__printf(2, 3) __cold
46744674
void netdev_crit(const struct net_device *dev, const char *format, ...);
4675-
__printf(2, 3)
4675+
__printf(2, 3) __cold
46764676
void netdev_err(const struct net_device *dev, const char *format, ...);
4677-
__printf(2, 3)
4677+
__printf(2, 3) __cold
46784678
void netdev_warn(const struct net_device *dev, const char *format, ...);
4679-
__printf(2, 3)
4679+
__printf(2, 3) __cold
46804680
void netdev_notice(const struct net_device *dev, const char *format, ...);
4681-
__printf(2, 3)
4681+
__printf(2, 3) __cold
46824682
void netdev_info(const struct net_device *dev, const char *format, ...);
46834683

46844684
#define netdev_level_once(level, dev, fmt, ...) \

0 commit comments

Comments
 (0)