]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/batman-adv/log.h
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
[karo-tx-linux.git] / net / batman-adv / log.h
index 7a2b9f4da07830103a8f00e4c3b488b0367a9dc2..65ce97efa6b5946175f64d300573a532f28387f8 100644 (file)
@@ -73,9 +73,10 @@ __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) &&     \
+               struct batadv_priv *__batpriv = (bat_priv);             \
+               if (atomic_read(&__batpriv->log_level) & (type) &&      \
                    (!(ratelimited) || net_ratelimit()))                \
-                       batadv_debug_log(bat_priv, fmt, ## arg);        \
+                       batadv_debug_log(__batpriv, fmt, ## arg);       \
        }                                                               \
        while (0)
 #else /* !CONFIG_BATMAN_ADV_DEBUG */