linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert+renesas@glider.be>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Kevin Hilman <khilman@kernel.org>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Axel Haslam <ahaslam+renesas@baylibre.com>,
	Lina Iyer <lina.iyer@linaro.org>
Cc: linux-pm@vger.kernel.org, Geert Uytterhoeven <geert+renesas@glider.be>
Subject: [PATCH 2/2] [RFC] PM / Domains: Join state name and index in debugfs output
Date: Tue, 23 Feb 2016 17:49:18 +0100	[thread overview]
Message-ID: <1456246158-19673-2-git-send-email-geert+renesas@glider.be> (raw)
In-Reply-To: <1456246158-19673-1-git-send-email-geert+renesas@glider.be>

For low-power states, the state index is part of the state, hence join
them with a hyphen in the /sys/kernel/debug/pm_genpd/pm_genpd_summary
output. E.g. "off 0" becomes "off-0".

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Alternative separators could be ":" or "/".
---
 drivers/base/power/domain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 01015d85ab6493fc..9e59543d314c4b0b 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -1892,7 +1892,7 @@ static int pm_genpd_summary_one(struct seq_file *s,
 	if (WARN_ON(genpd->status >= ARRAY_SIZE(status_lookup)))
 		goto exit;
 	if (genpd->status == GPD_STATE_POWER_OFF)
-		snprintf(state, sizeof(state), "%s %u",
+		snprintf(state, sizeof(state), "%s-%u",
 			 status_lookup[genpd->status], genpd->state_idx);
 	else
 		snprintf(state, sizeof(state), "%s",
-- 
1.9.1


  reply	other threads:[~2016-02-23 16:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-23 16:49 [PATCH 1/2] PM / Domains: Restore alignment of slaves in debugfs output Geert Uytterhoeven
2016-02-23 16:49 ` Geert Uytterhoeven [this message]
2016-02-29 12:04   ` [PATCH 2/2] [RFC] PM / Domains: Join state name and index " Ulf Hansson
2016-03-01 18:55   ` Kevin Hilman
2016-02-24  9:31 ` [PATCH 1/2] PM / Domains: Restore alignment of slaves " Axel Haslam
2016-02-29 12:03 ` Ulf Hansson
2016-03-01 18:54 ` Kevin Hilman
2016-03-10 23:22 ` 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=1456246158-19673-2-git-send-email-geert+renesas@glider.be \
    --to=geert+renesas@glider.be \
    --cc=ahaslam+renesas@baylibre.com \
    --cc=khilman@kernel.org \
    --cc=lina.iyer@linaro.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=ulf.hansson@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).