diff options
author | Joe Perches <joe@perches.com> | 2011-12-15 17:55:53 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-12-19 14:35:31 -0500 |
commit | d2182b69dcb6a68b1ef6070b2efd094e13dea3f1 (patch) | |
tree | 92da8da22d48540d9f28b1e91ba0d1befbac5fe9 /drivers/net/wireless/ath/ath.h | |
parent | a85e1d55974646a442d95911e3f7d7a891ea9ac5 (diff) |
ath: Convert ath_dbg(bar, ATH_DBG_<FOO>, to ath_dbg(bar, FOO
Add ATH_DBG_ to macros to shorten the uses and
reduce the line count.
Coalesce ath_dbg formats.
Add missing spaces to coalesced formats.
Add missing newline terminations to ath_dbg formats.
Align ath_dbg arguments where appropriate.
Standardize ath_dbg formats without periods.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath.h')
-rw-r--r-- | drivers/net/wireless/ath/ath.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h index c1d699fd5717..efc01110dc34 100644 --- a/drivers/net/wireless/ath/ath.h +++ b/drivers/net/wireless/ath/ath.h | |||
@@ -255,7 +255,7 @@ enum ATH_DEBUG { | |||
255 | 255 | ||
256 | #define ath_dbg(common, dbg_mask, fmt, ...) \ | 256 | #define ath_dbg(common, dbg_mask, fmt, ...) \ |
257 | do { \ | 257 | do { \ |
258 | if ((common)->debug_mask & dbg_mask) \ | 258 | if ((common)->debug_mask & ATH_DBG_##dbg_mask) \ |
259 | _ath_printk(KERN_DEBUG, common, fmt, ##__VA_ARGS__); \ | 259 | _ath_printk(KERN_DEBUG, common, fmt, ##__VA_ARGS__); \ |
260 | } while (0) | 260 | } while (0) |
261 | 261 | ||
@@ -265,10 +265,13 @@ do { \ | |||
265 | #else | 265 | #else |
266 | 266 | ||
267 | static inline __attribute__ ((format (printf, 3, 4))) | 267 | static inline __attribute__ ((format (printf, 3, 4))) |
268 | void ath_dbg(struct ath_common *common, enum ATH_DEBUG dbg_mask, | 268 | void _ath_dbg(struct ath_common *common, enum ATH_DEBUG dbg_mask, |
269 | const char *fmt, ...) | 269 | const char *fmt, ...) |
270 | { | 270 | { |
271 | } | 271 | } |
272 | #define ath_dbg(common, dbg_mask, fmt, ...) \ | ||
273 | _ath_dbg(common, ATH_DBG_##dbg_mask, fmt, ##__VA_ARGS__) | ||
274 | |||
272 | #define ATH_DBG_WARN(foo, arg...) do {} while (0) | 275 | #define ATH_DBG_WARN(foo, arg...) do {} while (0) |
273 | #define ATH_DBG_WARN_ON_ONCE(foo) ({ \ | 276 | #define ATH_DBG_WARN_ON_ONCE(foo) ({ \ |
274 | int __ret_warn_once = !!(foo); \ | 277 | int __ret_warn_once = !!(foo); \ |