summaryrefslogtreecommitdiffstats
path: root/kernel/power/process.c
diff options
context:
space:
mode:
authorDavid Cohen <dacohen@pm.me>2022-03-24 09:07:24 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-04-13 16:34:01 +0200
commitae20cb9aec91ec3c668e413b93a6080803464ae5 (patch)
tree35151f1707e452f0eb48cb22a591fc6665037ab5 /kernel/power/process.c
parentLinux 5.18-rc2 (diff)
downloadlinux-ae20cb9aec91ec3c668e413b93a6080803464ae5.tar.xz
linux-ae20cb9aec91ec3c668e413b93a6080803464ae5.zip
PM: sleep: Narrow down -DDEBUG on kernel/power/ files
The macro -DDEBUG is broadly enabled on kernel/power/ directory if CONFIG_DYNAMIC_DEBUG is enabled. As side effect all debug messages using pr_debug() and dev_dbg() are enabled by default on dynamic debug. We're reworking pm_pr_dbg() to support dynamic debug, where pm_pr_dbg() will print message if either pm_debug_messages_on flag is set or if it's explicitly enabled on dynamic debug's control. That means if we let -DDEBUG broadly set, the pm_debug_messages_on flag will be bypassed by default on pm_pr_dbg() if dynamic debug is also enabled. The files that directly use pr_debug() and dev_dbg() on kernel/power/ are: - swap.c - snapshot.c - energy_model.c And those files do not use pm_pr_dbg(). So if we limit -DDEBUG to them, we keep the same functional behavior while allowing the pm_pr_dbg() refactor. Signed-off-by: David Cohen <dacohen@pm.me> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'kernel/power/process.c')
-rw-r--r--kernel/power/process.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/kernel/power/process.c b/kernel/power/process.c
index 11b570fcf049..3068601e585a 100644
--- a/kernel/power/process.c
+++ b/kernel/power/process.c
@@ -6,9 +6,6 @@
* Originally from swsusp.
*/
-
-#undef DEBUG
-
#include <linux/interrupt.h>
#include <linux/oom.h>
#include <linux/suspend.h>