X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=net%2Fbatman-adv%2Flog.h;h=3284a7b0325dc631bc8de438a0f62ba8587c9f50;hb=54ab6db0909061ab7ee07233d3cab86d29f86e6c;hp=d2905a855d1b9b3e55b102ec7c4b33a389395476;hpb=c44ef859ceff45db1c72f9ccbfae96843c4b1501;p=karo-tx-linux.git diff --git a/net/batman-adv/log.h b/net/batman-adv/log.h index d2905a855d1b..3284a7b0325d 100644 --- a/net/batman-adv/log.h +++ b/net/batman-adv/log.h @@ -71,12 +71,12 @@ int batadv_debug_log(struct batadv_priv *bat_priv, const char *fmt, ...) __printf(2, 3); /* possibly ratelimited debug output */ -#define _batadv_dbg(type, bat_priv, ratelimited, fmt, arg...) \ - do { \ - if (atomic_read(&bat_priv->log_level) & type && \ - (!ratelimited || net_ratelimit())) \ - batadv_debug_log(bat_priv, fmt, ## arg);\ - } \ +#define _batadv_dbg(type, bat_priv, ratelimited, fmt, arg...) \ + do { \ + if (atomic_read(&(bat_priv)->log_level) & (type) && \ + (!(ratelimited) || net_ratelimit())) \ + batadv_debug_log(bat_priv, fmt, ## arg); \ + } \ while (0) #else /* !CONFIG_BATMAN_ADV_DEBUG */ __printf(4, 5)