From: Rasmus Villemoes Date: Fri, 8 Mar 2019 00:27:29 +0000 (-0800) Subject: linux/printk.h: use DYNAMIC_DEBUG_BRANCH in pr_debug_ratelimited X-Git-Tag: v5.1-rc1~118^2~66 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=a9d4ab7a91165f325060d6441169ebeab08a2fec;p=users%2Fjedix%2Flinux-maple.git linux/printk.h: use DYNAMIC_DEBUG_BRANCH in pr_debug_ratelimited pr_debug_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-4-linux@rasmusvillemoes.dk Signed-off-by: Rasmus Villemoes Acked-by: Petr Mladek Acked-by: Jason Baron Cc: Steven Rostedt Cc: David Sterba Cc: Greg Kroah-Hartman Cc: Ingo Molnar Cc: "Rafael J . Wysocki" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/printk.h b/include/linux/printk.h index 77740a506ebb..02b5c115d89b 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -461,7 +461,7 @@ do { \ DEFAULT_RATELIMIT_INTERVAL, \ DEFAULT_RATELIMIT_BURST); \ DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, pr_fmt(fmt)); \ - if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT) && \ + if (DYNAMIC_DEBUG_BRANCH(descriptor) && \ __ratelimit(&_rs)) \ __dynamic_pr_debug(&descriptor, pr_fmt(fmt), ##__VA_ARGS__); \ } while (0)