From: Joe Perches Date: Wed, 21 Nov 2012 18:17:34 +0000 (-0800) Subject: brcmsmac: Add __printf verification to logging prototypes X-Git-Tag: v3.8-rc1~139^2~17^2~121 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fbbdcc0213bbf74acb5d6d210a9cb4db557edd30;p=platform%2Fkernel%2Flinux-stable.git brcmsmac: Add __printf verification to logging prototypes Adding __printf helps spot format and argument mismatches. Signed-off-by: Joe Perches Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/brcm80211/brcmsmac/debug.h b/drivers/net/wireless/brcm80211/brcmsmac/debug.h index c0d2cf7..f77066b 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/debug.h +++ b/drivers/net/wireless/brcm80211/brcmsmac/debug.h @@ -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