ACPI: use proper DYNAMIC_DEBUG_BRANCH macro
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Fri, 8 Mar 2019 00:28:03 +0000 (16:28 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 8 Mar 2019 02:32:00 +0000 (18:32 -0800)
dynamic debug may be implemented via static keys, but ACPI is missing
out on that runtime benefit since it open-codes one possible definition
of DYNAMIC_DEBUG_BRANCH.

Link: http://lkml.kernel.org/r/20190212214150.4807-13-linux@rasmusvillemoes.dk
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Acked-by: Jason Baron <jbaron@akamai.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.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: 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/acpi.h

index 03b4c4f..c15a007 100644 (file)
@@ -987,7 +987,7 @@ void __acpi_handle_debug(struct _ddebug *descriptor, acpi_handle handle, const c
 #define acpi_handle_debug(handle, fmt, ...)                            \
 do {                                                                   \
        DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);                 \
-       if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT))          \
+       if (DYNAMIC_DEBUG_BRANCH(descriptor))                           \
                __acpi_handle_debug(&descriptor, handle, pr_fmt(fmt),   \
                                ##__VA_ARGS__);                         \
 } while (0)