Merge git://github.com/Jkirsher/net-next
[pandora-kernel.git] / drivers / net / wireless / ath / ath.h
index 17c4b56..9891fb6 100644 (file)
@@ -178,23 +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
@@ -246,27 +252,21 @@ enum ATH_DEBUG {
 
 #ifdef CONFIG_ATH_DEBUG
 
-#define ath_dbg(common, dbg_mask, fmt, ...)                    \
-({                                                             \
-       int rtn;                                                \
-       if ((common)->debug_mask & dbg_mask)                    \
-               rtn = ath_printk(KERN_DEBUG, common, fmt,       \
-                                ##__VA_ARGS__);                \
-       else                                                    \
-               rtn = 0;                                        \
-                                                               \
-       rtn;                                                    \
-})
+#define ath_dbg(common, dbg_mask, fmt, ...)                            \
+do {                                                                   \
+       if ((common)->debug_mask & dbg_mask)                            \
+               _ath_printk(KERN_DEBUG, common, fmt, ##__VA_ARGS__);    \
+} while (0)
+
 #define ATH_DBG_WARN(foo, arg...) WARN(foo, arg)
 #define ATH_DBG_WARN_ON_ONCE(foo) WARN_ON_ONCE(foo)
 
 #else
 
-static inline  __attribute__ ((format (printf, 3, 4))) int
-ath_dbg(struct ath_common *common, enum ATH_DEBUG dbg_mask,
-       const char *fmt, ...)
+static inline  __attribute__((format (printf, 3, 4)))
+void ath_dbg(struct ath_common *common, enum ATH_DEBUG dbg_mask,
+            const char *fmt, ...)
 {
-       return 0;
 }
 #define ATH_DBG_WARN(foo, arg...) do {} while (0)
 #define ATH_DBG_WARN_ON_ONCE(foo) ({                           \