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.
Showing the changes to include/linux (1 of 1 file). Show all
Unified · Split
| @@ -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 |
| 4667 | void netdev_printk(const char *level, const struct net_device *dev, | 4667 | void 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 |
| 4670 | void netdev_emerg(const struct net_device *dev, const char *format, ...); | 4670 | void netdev_emerg(const struct net_device *dev, const char *format, ...); |
| 4671 | __printf(2, 3) | 4671 | __printf(2, 3) __cold |
| 4672 | void netdev_alert(const struct net_device *dev, const char *format, ...); | 4672 | void netdev_alert(const struct net_device *dev, const char *format, ...); |
| 4673 | __printf(2, 3) | 4673 | __printf(2, 3) __cold |
| 4674 | void netdev_crit(const struct net_device *dev, const char *format, ...); | 4674 | void netdev_crit(const struct net_device *dev, const char *format, ...); |
| 4675 | __printf(2, 3) | 4675 | __printf(2, 3) __cold |
| 4676 | void netdev_err(const struct net_device *dev, const char *format, ...); | 4676 | void netdev_err(const struct net_device *dev, const char *format, ...); |
| 4677 | __printf(2, 3) | 4677 | __printf(2, 3) __cold |
| 4678 | void netdev_warn(const struct net_device *dev, const char *format, ...); | 4678 | void netdev_warn(const struct net_device *dev, const char *format, ...); |
| 4679 | __printf(2, 3) | 4679 | __printf(2, 3) __cold |
| 4680 | void netdev_notice(const struct net_device *dev, const char *format, ...); | 4680 | void netdev_notice(const struct net_device *dev, const char *format, ...); |
| 4681 | __printf(2, 3) | 4681 | __printf(2, 3) __cold |
| 4682 | void netdev_info(const struct net_device *dev, const char *format, ...); | 4682 | void 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, ...) \ |