aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/batman-adv/bat_debugfs.c1
-rw-r--r--net/batman-adv/main.h3
2 files changed, 3 insertions, 1 deletions
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)
50 debug_log->log_start = debug_log->log_end - log_buff_len; 50 debug_log->log_start = debug_log->log_end - log_buff_len;
51} 51}
52 52
53__printf(2, 3)
53static int fdebug_log(struct debug_log *debug_log, char *fmt, ...) 54static int fdebug_log(struct debug_log *debug_log, char *fmt, ...)
54{ 55{
55 va_list args; 56 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);
136int is_my_mac(uint8_t *addr); 136int is_my_mac(uint8_t *addr);
137 137
138#ifdef CONFIG_BATMAN_ADV_DEBUG 138#ifdef CONFIG_BATMAN_ADV_DEBUG
139int debug_log(struct bat_priv *bat_priv, char *fmt, ...); 139int debug_log(struct bat_priv *bat_priv, char *fmt, ...) __printf(2, 3);
140 140
141#define bat_dbg(type, bat_priv, fmt, arg...) \ 141#define bat_dbg(type, bat_priv, fmt, arg...) \
142 do { \ 142 do { \
@@ -145,6 +145,7 @@ int debug_log(struct bat_priv *bat_priv, char *fmt, ...);
145 } \ 145 } \
146 while (0) 146 while (0)
147#else /* !CONFIG_BATMAN_ADV_DEBUG */ 147#else /* !CONFIG_BATMAN_ADV_DEBUG */
148__printf(3, 4)
148static inline void bat_dbg(char type __always_unused, 149static inline void bat_dbg(char type __always_unused,
149 struct bat_priv *bat_priv __always_unused, 150 struct bat_priv *bat_priv __always_unused,
150 char *fmt __always_unused, ...) 151 char *fmt __always_unused, ...)