From b095d2f1d337a657a2ff6055d19bc55b530aea80 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Fri, 26 Aug 2011 01:56:39 -0700 Subject: [PATCH] --- yaml --- r: 265903 b: refs/heads/master c: 29e76245d46ff530bb2b0311e9fc823fc07b1147 h: refs/heads/master i: 265901: b2bd5086f4eedeb9bd7d5e4c1be2d8f74f1d6d48 265899: 2b2217bd5eab693d6f05e10e716bbcd6e230d063 265895: cf446f5a7959fa83575b4e12976a03d807186ad3 265887: 6a235c91b3068a7ff0c8aa52c82223d2e895548b v: v3 --- [refs] | 2 +- trunk/drivers/net/wireless/ath/ath.h | 27 ++++++++++++++++----------- trunk/drivers/net/wireless/ath/main.c | 8 ++------ 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/[refs] b/[refs] index 9c27fbbe157b..a71615fd690b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7b8112d6db0cc67dd2a722ca5bf707768890ac9d +refs/heads/master: 29e76245d46ff530bb2b0311e9fc823fc07b1147 diff --git a/trunk/drivers/net/wireless/ath/ath.h b/trunk/drivers/net/wireless/ath/ath.h index a3f8505c712b..9891fb605a01 100644 --- a/trunk/drivers/net/wireless/ath/ath.h +++ b/trunk/drivers/net/wireless/ath/ath.h @@ -178,24 +178,29 @@ bool ath_hw_keyreset(struct ath_common *common, u16 entry); void ath_hw_cycle_counters_update(struct ath_common *common); int32_t ath_hw_get_listen_time(struct ath_common *common); -extern __attribute__((format (printf, 3, 4))) -int ath_printk(const char *level, struct ath_common *common, - const char *fmt, ...); +extern __attribute__((format (printf, 2, 3))) +void ath_printk(const char *level, const char *fmt, ...); + +#define _ath_printk(level, common, fmt, ...) \ +do { \ + __always_unused struct ath_common *unused = common; \ + ath_printk(level, fmt, ##__VA_ARGS__); \ +} while (0) #define ath_emerg(common, fmt, ...) \ - ath_printk(KERN_EMERG, common, fmt, ##__VA_ARGS__) + _ath_printk(KERN_EMERG, common, fmt, ##__VA_ARGS__) #define ath_alert(common, fmt, ...) \ - ath_printk(KERN_ALERT, common, fmt, ##__VA_ARGS__) + _ath_printk(KERN_ALERT, common, fmt, ##__VA_ARGS__) #define ath_crit(common, fmt, ...) \ - ath_printk(KERN_CRIT, common, fmt, ##__VA_ARGS__) + _ath_printk(KERN_CRIT, common, fmt, ##__VA_ARGS__) #define ath_err(common, fmt, ...) \ - ath_printk(KERN_ERR, common, fmt, ##__VA_ARGS__) + _ath_printk(KERN_ERR, common, fmt, ##__VA_ARGS__) #define ath_warn(common, fmt, ...) \ - ath_printk(KERN_WARNING, common, fmt, ##__VA_ARGS__) + _ath_printk(KERN_WARNING, common, fmt, ##__VA_ARGS__) #define ath_notice(common, fmt, ...) \ - ath_printk(KERN_NOTICE, common, fmt, ##__VA_ARGS__) + _ath_printk(KERN_NOTICE, common, fmt, ##__VA_ARGS__) #define ath_info(common, fmt, ...) \ - ath_printk(KERN_INFO, common, fmt, ##__VA_ARGS__) + _ath_printk(KERN_INFO, common, fmt, ##__VA_ARGS__) /** * enum ath_debug_level - atheros wireless debug level @@ -250,7 +255,7 @@ enum ATH_DEBUG { #define ath_dbg(common, dbg_mask, fmt, ...) \ do { \ if ((common)->debug_mask & dbg_mask) \ - ath_printk(KERN_DEBUG, common, fmt, ##__VA_ARGS__); \ + _ath_printk(KERN_DEBUG, common, fmt, ##__VA_ARGS__); \ } while (0) #define ATH_DBG_WARN(foo, arg...) WARN(foo, arg) diff --git a/trunk/drivers/net/wireless/ath/main.c b/trunk/drivers/net/wireless/ath/main.c index c325202fdc5f..d9218fe02036 100644 --- a/trunk/drivers/net/wireless/ath/main.c +++ b/trunk/drivers/net/wireless/ath/main.c @@ -57,22 +57,18 @@ struct sk_buff *ath_rxbuf_alloc(struct ath_common *common, } EXPORT_SYMBOL(ath_rxbuf_alloc); -int ath_printk(const char *level, struct ath_common *common, - const char *fmt, ...) +void ath_printk(const char *level, const char *fmt, ...) { struct va_format vaf; va_list args; - int rtn; va_start(args, fmt); vaf.fmt = fmt; vaf.va = &args; - rtn = printk("%sath: %pV", level, &vaf); + printk("%sath: %pV", level, &vaf); va_end(args); - - return rtn; } EXPORT_SYMBOL(ath_printk);