From: zhaoxiao <zhaoxiao@uniontech.com>
To: rjw@rjwysocki.net, pavel@ucw.cz, len.brown@intel.com,
gregkh@linuxfoundation.org
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
zhaoxiao <zhaoxiao@uniontech.com>
Subject: [PATCH] PM: Use pm_pr_dbg() instead of pr_debug().
Date: Fri, 23 Apr 2021 16:12:23 +0800 [thread overview]
Message-ID: <20210423081223.26111-1-zhaoxiao@uniontech.com> (raw)
These prints are useful if we're doing PM suspend debugging. Having them
at pr_debug() level means that we need to either enable DEBUG in this
file, or compile the kernel with dynamic debug capabilities. Both of
these options have drawbacks like custom compilation or opting into all
debug statements being included into the kernel image. Given that we
already have infrastructure to collect PM debugging information with
CONFIG_PM_DEBUG and friends, let's change the pr_debug usage here to be
pm_pr_dbg() instead so we can collect the wakeup information in the
kernel logs.
Signed-off-by: zhaoxiao <zhaoxiao@uniontech.com>
---
drivers/base/power/main.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index f893c3c5af07..6e64e3fff84c 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -133,7 +133,7 @@ void device_pm_add(struct device *dev)
if (device_pm_not_required(dev))
return;
- pr_debug("Adding info for %s:%s\n",
+ pm_pr_dbg("Adding info for %s:%s\n",
dev->bus ? dev->bus->name : "No Bus", dev_name(dev));
device_pm_check_callbacks(dev);
mutex_lock(&dpm_list_mtx);
@@ -154,7 +154,7 @@ void device_pm_remove(struct device *dev)
if (device_pm_not_required(dev))
return;
- pr_debug("Removing info for %s:%s\n",
+ pm_pr_dbg("Removing info for %s:%s\n",
dev->bus ? dev->bus->name : "No Bus", dev_name(dev));
complete_all(&dev->power.completion);
mutex_lock(&dpm_list_mtx);
@@ -173,7 +173,7 @@ void device_pm_remove(struct device *dev)
*/
void device_pm_move_before(struct device *deva, struct device *devb)
{
- pr_debug("Moving %s:%s before %s:%s\n",
+ pm_pr_dbg("Moving %s:%s before %s:%s\n",
deva->bus ? deva->bus->name : "No Bus", dev_name(deva),
devb->bus ? devb->bus->name : "No Bus", dev_name(devb));
/* Delete deva from dpm_list and reinsert before devb. */
@@ -187,7 +187,7 @@ void device_pm_move_before(struct device *deva, struct device *devb)
*/
void device_pm_move_after(struct device *deva, struct device *devb)
{
- pr_debug("Moving %s:%s after %s:%s\n",
+ pm_pr_dbg("Moving %s:%s after %s:%s\n",
deva->bus ? deva->bus->name : "No Bus", dev_name(deva),
devb->bus ? devb->bus->name : "No Bus", dev_name(devb));
/* Delete deva from dpm_list and reinsert after devb. */
@@ -200,7 +200,7 @@ void device_pm_move_after(struct device *deva, struct device *devb)
*/
void device_pm_move_last(struct device *dev)
{
- pr_debug("Moving %s:%s to end of list\n",
+ pm_pr_dbg("Moving %s:%s to end of list\n",
dev->bus ? dev->bus->name : "No Bus", dev_name(dev));
list_move_tail(&dev->power.entry, &dpm_list);
}
--
2.20.1
next reply other threads:[~2021-04-23 8:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-23 8:12 zhaoxiao [this message]
2021-04-23 9:09 ` Greg KH
2021-04-23 12:16 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210423081223.26111-1-zhaoxiao@uniontech.com \
--to=zhaoxiao@uniontech.com \
--cc=gregkh@linuxfoundation.org \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rjw@rjwysocki.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®