From: Sven Eckelmann Date: Sat, 14 May 2011 21:14:46 +0000 (+0200) Subject: batman-adv: Annotate functions with format strings X-Git-Tag: firefly_0821_release~3680^2~5008^2~199^2~42 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d3a547be40008be590c169ff2d5d73cc7fada71d;p=firefly-linux-kernel-4.4.55.git batman-adv: Annotate functions with format strings Signed-off-by: Sven Eckelmann --- diff --git a/net/batman-adv/bat_debugfs.c b/net/batman-adv/bat_debugfs.c index abaeec5f6247..4577d3fe9940 100644 --- a/net/batman-adv/bat_debugfs.c +++ b/net/batman-adv/bat_debugfs.c @@ -50,6 +50,7 @@ static void emit_log_char(struct debug_log *debug_log, char c) debug_log->log_start = debug_log->log_end - log_buff_len; } +__printf(2, 3) static int fdebug_log(struct debug_log *debug_log, char *fmt, ...) { va_list args; diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h index 148b49e02642..ba28436bcdd6 100644 --- a/net/batman-adv/main.h +++ b/net/batman-adv/main.h @@ -136,7 +136,7 @@ void dec_module_count(void); int is_my_mac(uint8_t *addr); #ifdef CONFIG_BATMAN_ADV_DEBUG -int debug_log(struct bat_priv *bat_priv, char *fmt, ...); +int debug_log(struct bat_priv *bat_priv, char *fmt, ...) __printf(2, 3); #define bat_dbg(type, bat_priv, fmt, arg...) \ do { \ @@ -145,6 +145,7 @@ int debug_log(struct bat_priv *bat_priv, char *fmt, ...); } \ while (0) #else /* !CONFIG_BATMAN_ADV_DEBUG */ +__printf(3, 4) static inline void bat_dbg(char type __always_unused, struct bat_priv *bat_priv __always_unused, char *fmt __always_unused, ...)