]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
linux/net.h: use DYNAMIC_DEBUG_BRANCH in net_dbg_ratelimited
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Fri, 8 Mar 2019 00:27:25 +0000 (16:27 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
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/20190212214150.4807-3-linux@rasmusvillemoes.dk
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Acked-by: Jason Baron <jbaron@akamai.com>
Cc: David Sterba <dsterba@suse.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Petr Mladek <pmladek@suse.com>
Cc: "Rafael J . Wysocki" <rafael.j.wysocki@intel.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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__);                      \