Message ID | 1456246158-19673-2-git-send-email-geert+renesas@glider.be (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Rafael Wysocki |
Headers | show |
On 23 February 2016 at 17:49, Geert Uytterhoeven <geert+renesas@glider.be> wrote: > 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> Acked-by: Ulf Hansson <ulf.hansson@linaro.org> Kind regards Uffe > --- > 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 > -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Geert Uytterhoeven <geert+renesas@glider.be> writes: > 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> Tested-by: Kevin Hilman <khilman@baylibre.com> -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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",
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(-)