提交 fbbdcc02 编写于 作者: J Joe Perches 提交者: John W. Linville

brcmsmac: Add __printf verification to logging prototypes

Adding __printf helps spot format and argument mismatches.
Signed-off-by: NJoe Perches <joe@perches.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 62c8003e
...@@ -8,17 +8,23 @@ ...@@ -8,17 +8,23 @@
#include "main.h" #include "main.h"
#include "mac80211_if.h" #include "mac80211_if.h"
__printf(2, 3)
void __brcms_info(struct device *dev, const char *fmt, ...); void __brcms_info(struct device *dev, const char *fmt, ...);
__printf(2, 3)
void __brcms_warn(struct device *dev, const char *fmt, ...); void __brcms_warn(struct device *dev, const char *fmt, ...);
__printf(2, 3)
void __brcms_err(struct device *dev, const char *fmt, ...); void __brcms_err(struct device *dev, const char *fmt, ...);
__printf(2, 3)
void __brcms_crit(struct device *dev, const char *fmt, ...); void __brcms_crit(struct device *dev, const char *fmt, ...);
#if defined(CONFIG_BRCMDBG) || defined(CONFIG_BRCM_TRACING) #if defined(CONFIG_BRCMDBG) || defined(CONFIG_BRCM_TRACING)
__printf(4, 5)
void __brcms_dbg(struct device *dev, u32 level, const char *func, void __brcms_dbg(struct device *dev, u32 level, const char *func,
const char *fmt, ...); const char *fmt, ...);
#else #else
static inline void __brcms_dbg(struct device *dev, u32 level, static inline __printf(4, 5)
const char *func, const char *fmt, ...) void __brcms_dbg(struct device *dev, u32 level, const char *func,
const char *fmt, ...)
{ {
} }
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册