Skip to content

Commit

Permalink
netdevice.h: Add __cold to netdev_<level> logging functions
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joe Perches authored and David S. Miller committed Feb 4, 2019
1 parent ff7653f commit ce3fdb6
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -4663,22 +4663,22 @@ static inline const char *netdev_reg_state(const struct net_device *dev)
return " (unknown)";
}

__printf(3, 4)
__printf(3, 4) __cold
void netdev_printk(const char *level, const struct net_device *dev,
const char *format, ...);
__printf(2, 3)
__printf(2, 3) __cold
void netdev_emerg(const struct net_device *dev, const char *format, ...);
__printf(2, 3)
__printf(2, 3) __cold
void netdev_alert(const struct net_device *dev, const char *format, ...);
__printf(2, 3)
__printf(2, 3) __cold
void netdev_crit(const struct net_device *dev, const char *format, ...);
__printf(2, 3)
__printf(2, 3) __cold
void netdev_err(const struct net_device *dev, const char *format, ...);
__printf(2, 3)
__printf(2, 3) __cold
void netdev_warn(const struct net_device *dev, const char *format, ...);
__printf(2, 3)
__printf(2, 3) __cold
void netdev_notice(const struct net_device *dev, const char *format, ...);
__printf(2, 3)
__printf(2, 3) __cold
void netdev_info(const struct net_device *dev, const char *format, ...);

#define netdev_level_once(level, dev, fmt, ...) \
Expand Down

0 comments on commit ce3fdb6

Please sign in to comment.