summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath5k/ath5k.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-03-18 17:30:53 -0700
committerJohn W. Linville <linville@tuxdriver.com>2012-04-10 14:52:14 -0400
commit227842d1176019512d24236f7fb894f0fadd30d1 (patch)
tree431ec48aaacfbfbe33083cde0d038ec21284bfba /drivers/net/wireless/ath/ath5k/ath5k.h
parent516304b0f45614fb8967dc86ff681499204cdbb1 (diff)
ath5k: Introduce _ath5k_printk to reduce code/text
Macros can be converted to functions to reduce overall object size. Convert the ATH5K_PRINTK macro to use _ath5k_printk. Allyesconfig size is reduced ~10% $ size drivers/net/wireless/ath/ath5k/built-in.o* text data bss dec hex filename 211557 2032 40672 254261 3e135 drivers/net/wireless/ath/ath5k/built-in.o.new 235412 2032 47296 284740 45844 drivers/net/wireless/ath/ath5k/built-in.o.old Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/ath5k.h')
-rw-r--r--drivers/net/wireless/ath/ath5k/ath5k.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h b/drivers/net/wireless/ath/ath5k/ath5k.h
index 954c3734da9..55ef93dd743 100644
--- a/drivers/net/wireless/ath/ath5k/ath5k.h
+++ b/drivers/net/wireless/ath/ath5k/ath5k.h
@@ -79,11 +79,12 @@
#define ATH5K_PRINTF(fmt, ...) \
pr_warn("%s: " fmt, __func__, ##__VA_ARGS__)
+void __printf(3, 4)
+_ath5k_printk(const struct ath5k_hw *ah, const char *level,
+ const char *fmt, ...);
+
#define ATH5K_PRINTK(_sc, _level, _fmt, ...) \
- printk(_level pr_fmt("%s%s" _fmt), \
- ((_sc) && (_sc)->hw) ? wiphy_name((_sc)->hw->wiphy) : "", \
- ((_sc) && (_sc)->hw) ? ": " : "", \
- ##__VA_ARGS__)
+ _ath5k_printk(_sc, _level, _fmt, ##__VA_ARGS__)
#define ATH5K_PRINTK_LIMIT(_sc, _level, _fmt, ...) \
do { \