brcmsmac: Add __printf verification to logging prototypes
authorJoe Perches <joe@perches.com>
Wed, 21 Nov 2012 18:17:34 +0000 (10:17 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 26 Nov 2012 19:54:20 +0000 (14:54 -0500)
Adding __printf helps spot format and argument mismatches.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmsmac/debug.h

index c0d2cf7d9be1dda43ee4237e4de4d277563a2db5..f77066bda9d2abb8c708ac3a66f816ea3178ed97 100644 (file)
@@ -8,17 +8,23 @@
 #include "main.h"
 #include "mac80211_if.h"
 
+__printf(2, 3)
 void __brcms_info(struct device *dev, const char *fmt, ...);
+__printf(2, 3)
 void __brcms_warn(struct device *dev, const char *fmt, ...);
+__printf(2, 3)
 void __brcms_err(struct device *dev, const char *fmt, ...);
+__printf(2, 3)
 void __brcms_crit(struct device *dev, const char *fmt, ...);
 
 #if defined(CONFIG_BRCMDBG) || defined(CONFIG_BRCM_TRACING)
+__printf(4, 5)
 void __brcms_dbg(struct device *dev, u32 level, const char *func,
                 const char *fmt, ...);
 #else
-static inline void __brcms_dbg(struct device *dev, u32 level,
-                              const char *func, const char *fmt, ...)
+static inline __printf(4, 5)
+void __brcms_dbg(struct device *dev, u32 level, const char *func,
+                const char *fmt, ...)
 {
 }
 #endif