From: Rasmus Villemoes Date: Fri, 8 Mar 2019 00:27:25 +0000 (-0800) Subject: linux/net.h: use DYNAMIC_DEBUG_BRANCH in net_dbg_ratelimited X-Git-Tag: Ubuntu-5.2.0-15.16~2428^2~67 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=3f16d181174879eccc523300a53b9eac2eee6e6d;p=mirror_ubuntu-eoan-kernel.git linux/net.h: use DYNAMIC_DEBUG_BRANCH in net_dbg_ratelimited 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 Acked-by: Jason Baron Cc: David Sterba Cc: Greg Kroah-Hartman Cc: Ingo Molnar Cc: Petr Mladek Cc: "Rafael J . Wysocki" Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/net.h b/include/linux/net.h index e0930678c8bf..651fca72286c 100644 --- a/include/linux/net.h +++ b/include/linux/net.h @@ -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__); \