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

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
4663 return " (unknown)";4663 return " (unknown)";
4664}4664}
4665 4665
4666__printf(3, 4)4666__printf(3, 4) __cold
4667void netdev_printk(const char *level, const struct net_device *dev,4667void netdev_printk(const char *level, const struct net_device *dev,
4668 const char *format, ...);4668 const char *format, ...);
4669__printf(2, 3)4669__printf(2, 3) __cold
4670void netdev_emerg(const struct net_device *dev, const char *format, ...);4670void netdev_emerg(const struct net_device *dev, const char *format, ...);
4671__printf(2, 3)4671__printf(2, 3) __cold
4672void netdev_alert(const struct net_device *dev, const char *format, ...);4672void netdev_alert(const struct net_device *dev, const char *format, ...);
4673__printf(2, 3)4673__printf(2, 3) __cold
4674void netdev_crit(const struct net_device *dev, const char *format, ...);4674void netdev_crit(const struct net_device *dev, const char *format, ...);
4675__printf(2, 3)4675__printf(2, 3) __cold
4676void netdev_err(const struct net_device *dev, const char *format, ...);4676void netdev_err(const struct net_device *dev, const char *format, ...);
4677__printf(2, 3)4677__printf(2, 3) __cold
4678void netdev_warn(const struct net_device *dev, const char *format, ...);4678void netdev_warn(const struct net_device *dev, const char *format, ...);
4679__printf(2, 3)4679__printf(2, 3) __cold
4680void netdev_notice(const struct net_device *dev, const char *format, ...);4680void netdev_notice(const struct net_device *dev, const char *format, ...);
4681__printf(2, 3)4681__printf(2, 3) __cold
4682void netdev_info(const struct net_device *dev, const char *format, ...);4682void netdev_info(const struct net_device *dev, const char *format, ...);
4683 4683
4684#define netdev_level_once(level, dev, fmt, ...) \4684#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