Skip to content

Commit

Permalink
brcmsmac: Add __printf verification to logging prototypes
Browse files Browse the repository at this point in the history
Adding __printf helps spot format and argument mismatches.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
  • Loading branch information
JoePerches authored and linvjw committed Nov 26, 2012
1 parent 62c8003 commit fbbdcc0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions drivers/net/wireless/brcm80211/brcmsmac/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fbbdcc0

Please sign in to comment.