From: zhuguangqing83@gmail.com
To: rjw@rjwysocki.net
Cc: pavel@ucw.cz, len.brown@intel.com, gregkh@linuxfoundation.org,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
zhuguangqing <zhuguangqing@xiaomi.com>
Subject: [PATCH v2]PM/wakeup: Add print_wakeup_source_stats(m, &deleted_ws)
Date: Mon, 9 Dec 2019 17:35:23 +0800 [thread overview]
Message-ID: <20191209093523.15752-1-zhuguangqing83@gmail.com> (raw)
From: zhuguangqing <zhuguangqing@xiaomi.com>
After commit 00ee22c28915 (PM / wakeup: Use seq_open()
to show wakeup stats), print_wakeup_source_stats(m, &deleted_ws)
is deleted in function wakeup_sources_stats_seq_show().
Because deleted_ws is one of wakeup sources, so it should
also be showed. This patch add it to the end of all other
wakeup sources.
Signed-off-by: zhuguangqing <zhuguangqing@xiaomi.com>
---
v2: modify judegment condition according to the advice of Rafael J.
drivers/base/power/wakeup.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c
index 5817b51d2b15..53c0519da1e4 100644
--- a/drivers/base/power/wakeup.c
+++ b/drivers/base/power/wakeup.c
@@ -1071,6 +1071,9 @@ static void *wakeup_sources_stats_seq_next(struct seq_file *m,
break;
}
+ if (!next_ws)
+ print_wakeup_source_stats(m, &deleted_ws);
+
return next_ws;
}
--
2.17.1
next reply other threads:[~2019-12-09 9:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-09 9:35 zhuguangqing83 [this message]
2019-12-20 9:19 ` [PATCH v2]PM/wakeup: Add print_wakeup_source_stats(m, &deleted_ws) 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=20191209093523.15752-1-zhuguangqing83@gmail.com \
--to=zhuguangqing83@gmail.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 \
--cc=zhuguangqing@xiaomi.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.