linux/net.h: use DYNAMIC_DEBUG_BRANCH in net_dbg_ratelimited
authorRasmus Villemoes <[email protected]>
Fri, 8 Mar 2019 00:27:25 +0000 (16:27 -0800)
committerLinus Torvalds <[email protected]>
Fri, 8 Mar 2019 02:31:59 +0000 (18:31 -0800)
net_dbg_ratelimited tests the dynamic debug descriptor the old-fashioned
way, and doesn't utilize the static key/jump label implementation when
CONFIG_JUMP_LABEL is set.  Use the DYNAMIC_DEBUG_BRANCH which is defined
appropriately.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Rasmus Villemoes <[email protected]>
Acked-by: Jason Baron <[email protected]>
Cc: David Sterba <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Petr Mladek <[email protected]>
Cc: "Rafael J . Wysocki" <[email protected]>
Cc: Steven Rostedt <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/net.h

index e0930678c8bf6e6061020176e8013b6e33d8264d..651fca72286c4838307b8fe83d78bbda2dc81015 100644 (file)
@@ -263,7 +263,7 @@ do {                                                                \
 #define net_dbg_ratelimited(fmt, ...)                                  \
 do {                                                                   \
        DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);                 \
-       if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT) &&        \
+       if (DYNAMIC_DEBUG_BRANCH(descriptor) &&                         \
            net_ratelimit())                                            \
                __dynamic_pr_debug(&descriptor, pr_fmt(fmt),            \
                                   ##__VA_ARGS__);                      \