History

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.

Joe Perches committed 7 years ago

Commit ce3fdb61 parent ff7653f1 file · +8 −8Browse files

Showing the changes to include/linux (1 of 1 file). Show all

Unified · Split

include/linux/netdevice.h+8−8
@@ -4663,22 +4663,22 @@ static inline const char *netdev_reg_state(const struct net_device *dev) · 4662 unmodified lines
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, ...) \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t