diff options
author | Joe Perches <joe@perches.com> | 2010-06-27 01:02:36 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-04 10:40:19 -0700 |
commit | f45f4321d2c977c9eff77e5a5225f3cd2140eb20 (patch) | |
tree | 20cae33624bd063d5b0298f66353ef509ee60d52 /include | |
parent | 256df2f3879efdb2e9808bdb1b54b16fbb11fa38 (diff) | |
download | op-kernel-dev-f45f4321d2c977c9eff77e5a5225f3cd2140eb20.zip op-kernel-dev-f45f4321d2c977c9eff77e5a5225f3cd2140eb20.tar.gz |
netdevice.h: Change netif_<level> macros to call netdev_<level> functions
Reduces text ~300 bytes of text (woohoo!) in an x86 defconfig
$ size vmlinux*
text data bss dec hex filename
7198526 720112 1366288 9284926 8dad3e vmlinux
7198862 720112 1366288 9285262 8dae8e vmlinux.netdev
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netdevice.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 0183901..4d27368 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -2314,20 +2314,26 @@ do { \ netdev_printk(level, (dev), fmt, ##args); \ } while (0) +#define netif_level(level, priv, type, dev, fmt, args...) \ +do { \ + if (netif_msg_##type(priv)) \ + netdev_##level(dev, fmt, ##args); \ +} while (0) + #define netif_emerg(priv, type, dev, fmt, args...) \ - netif_printk(priv, type, KERN_EMERG, dev, fmt, ##args) + netif_level(emerg, priv, type, dev, fmt, ##args) #define netif_alert(priv, type, dev, fmt, args...) \ - netif_printk(priv, type, KERN_ALERT, dev, fmt, ##args) + netif_level(alert, priv, type, dev, fmt, ##args) #define netif_crit(priv, type, dev, fmt, args...) \ - netif_printk(priv, type, KERN_CRIT, dev, fmt, ##args) + netif_level(crit, priv, type, dev, fmt, ##args) #define netif_err(priv, type, dev, fmt, args...) \ - netif_printk(priv, type, KERN_ERR, dev, fmt, ##args) + netif_level(err, priv, type, dev, fmt, ##args) #define netif_warn(priv, type, dev, fmt, args...) \ - netif_printk(priv, type, KERN_WARNING, dev, fmt, ##args) + netif_level(warn, priv, type, dev, fmt, ##args) #define netif_notice(priv, type, dev, fmt, args...) \ - netif_printk(priv, type, KERN_NOTICE, dev, fmt, ##args) + netif_level(notice, priv, type, dev, fmt, ##args) #define netif_info(priv, type, dev, fmt, args...) \ - netif_printk(priv, type, KERN_INFO, (dev), fmt, ##args) + netif_level(info, priv, type, dev, fmt, ##args) #if defined(DEBUG) #define netif_dbg(priv, type, dev, format, args...) \ |