From: Ulf Hansson <ulf.hansson@linaro•org>
To: Sudeep Holla <sudeep.holla@arm•com>,
Lorenzo Pieralisi <Lorenzo.Pieralisi@arm•com>,
linux-pm@vger•kernel.org
Cc: Ulf Hansson <ulf.hansson@linaro•org>,
Benjamin Gaignard <benjamin.gaignard@st•com>,
Stephen Boyd <sboyd@kernel•org>,
Daniel Lezcano <daniel.lezcano@linaro•org>,
"Rafael J . Wysocki" <rjw@rjwysocki•net>,
Lina Iyer <ilina@codeaurora•org>,
Bjorn Andersson <bjorn.andersson@linaro•org>,
stable@vger•kernel.org, linux-arm-kernel@lists•infradead.org
Subject: [PATCH v2 1/4] PM / Domains: Allow no domain-idle-states DT property in genpd when parsing
Date: Tue, 3 Mar 2020 21:35:56 +0100 [thread overview]
Message-ID: <20200303203559.23995-2-ulf.hansson@linaro.org> (raw)
In-Reply-To: <20200303203559.23995-1-ulf.hansson@linaro.org>
Commit 2c361684803e ("PM / Domains: Don't treat zero found compatible idle
states as an error"), moved of_genpd_parse_idle_states() towards allowing
none compatible idle state to be found for the device node, rather than
returning an error code.
However, it didn't consider that the "domain-idle-states" DT property may
be missing as it's optional, which makes of_count_phandle_with_args() to
return -ENOENT. Let's fix this to make the behaviour consistent.
Reported-by: Benjamin Gaignard <benjamin.gaignard@st•com>
Fixes: 2c361684803e ("PM / Domains: Don't treat zero found compatible idle states as an error")
Cc: <stable@vger•kernel.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro•org>
---
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 959d6d5eb000..0a01df608849 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -2653,7 +2653,7 @@ static int genpd_iterate_idle_states(struct device_node *dn,
ret = of_count_phandle_with_args(dn, "domain-idle-states", NULL);
if (ret <= 0)
- return ret;
+ return ret == -ENOENT ? 0 : ret;
/* Loop over the phandles until all the requested entry is found */
of_for_each_phandle(&it, ret, dn, "domain-idle-states", NULL, 0) {
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-03-03 20:36 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-03 20:35 [PATCH v2 0/4] cpuidle: psci: Some fixes when using the hierarchical layout Ulf Hansson
2020-03-03 20:35 ` Ulf Hansson [this message]
2020-03-04 10:48 ` [PATCH v2 1/4] PM / Domains: Allow no domain-idle-states DT property in genpd when parsing Sudeep Holla
2020-03-03 20:35 ` [PATCH v2 2/4] cpuidle: psci: Fixup support for domain idle states being zero Ulf Hansson
2020-03-04 10:50 ` Sudeep Holla
2020-03-04 12:17 ` Ulf Hansson
2020-03-03 20:35 ` [PATCH v2 3/4] cpuidle: psci: Split psci_dt_cpu_init_idle() Ulf Hansson
2020-03-04 12:12 ` Sudeep Holla
2020-03-04 12:20 ` Ulf Hansson
2020-03-03 20:35 ` [PATCH v2 4/4] cpuidle: psci: Allow WFI to be the only state for the hierarchical topology Ulf Hansson
2020-03-04 12:23 ` Sudeep Holla
2020-03-05 14:17 ` Ulf Hansson
2020-03-05 16:23 ` Sudeep Holla
2020-03-06 9:28 ` Ulf Hansson
2020-03-06 10:04 ` Sudeep Holla
2020-03-06 10:47 ` Benjamin Gaignard
2020-03-06 12:06 ` Sudeep Holla
2020-03-06 12:32 ` Benjamin Gaignard
2020-03-06 14:23 ` Sudeep Holla
2020-03-06 14:44 ` Benjamin Gaignard
2020-03-06 14:50 ` Sudeep Holla
2020-03-06 15:35 ` Benjamin Gaignard
2020-03-06 15:55 ` Sudeep Holla
2020-03-03 22:27 ` [PATCH v2 0/4] cpuidle: psci: Some fixes when using the hierarchical layout Rafael J. Wysocki
2020-03-09 7:20 ` Ulf Hansson
2020-03-10 8:37 ` 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=20200303203559.23995-2-ulf.hansson@linaro.org \
--to=ulf.hansson@linaro$(echo .)org \
--cc=Lorenzo.Pieralisi@arm$(echo .)com \
--cc=benjamin.gaignard@st$(echo .)com \
--cc=bjorn.andersson@linaro$(echo .)org \
--cc=daniel.lezcano@linaro$(echo .)org \
--cc=ilina@codeaurora$(echo .)org \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-pm@vger$(echo .)kernel.org \
--cc=rjw@rjwysocki$(echo .)net \
--cc=sboyd@kernel$(echo .)org \
--cc=stable@vger$(echo .)kernel.org \
--cc=sudeep.holla@arm$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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