gcc doesn't support the inlining of functions using vararg. Sparse fails to build the source when having such functions marked using the keyword "inline".
This problem was introduced in 3b896e321c49e3cbbfd540f537c007db883c3900
Signed-off-by: Sven Eckelmann sven@narfation.org --- main.h | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/main.h b/main.h index 977de45..4721c86 100644 --- a/main.h +++ b/main.h @@ -196,6 +196,17 @@ static inline void batadv_vdbg(int type, struct bat_priv *bat_priv, batadv_debug_log(bat_priv, fmt, args); }
+__printf(3, 4) +static inline void batadv_dbg(int type, struct bat_priv *bat_priv, + const char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + batadv_vdbg(type, bat_priv, fmt, args); + va_end(args); +} + #else /* !CONFIG_BATMAN_ADV_DEBUG */
static inline void batadv_vdbg(int type __always_unused, @@ -205,19 +216,14 @@ static inline void batadv_vdbg(int type __always_unused, { }
-#endif - __printf(3, 4) static inline void batadv_dbg(int type, struct bat_priv *bat_priv, const char *fmt, ...) { - va_list args; - - va_start(args, fmt); - batadv_vdbg(type, bat_priv, fmt, args); - va_end(args); }
+#endif + #define batadv_info(net_dev, fmt, arg...) \ do { \ struct net_device *_netdev = (net_dev); \