Re: [PATCH 1/7] pmdomain: arm: Fix -EINVAL from scmi_pd_set_perf_state() on state 0

From: Mukesh Savaliya

Date: Wed Aug 12 2026 - 05:21:20 EST




On 8/12/2026 2:27 PM, Ulf Hansson wrote:
On Wed, Aug 12, 2026 at 9:24 AM Mukesh Savaliya

[...]
--- a/drivers/pmdomain/arm/scmi_perf_domain.c
+++ b/drivers/pmdomain/arm/scmi_perf_domain.c
@@ -33,7 +33,7 @@ scmi_pd_set_perf_state(struct generic_pm_domain *genpd, unsigned int state)
return 0;

if (!state)
- return -EINVAL;
+ return 0;

Won't this cause an issue to other drivers ? how are they going to take
action based on changed return value ?

I think it's rather the opposite. With the current returned value
(-EINVAL) the driver doesn't really know what to do. It tried to drop
its vote, but that failed - so what can it do?

Moreover, from genpd point of view, this fixes a real bug as the
aggregation for the performance state becomes incorrect during runtime
suspend/resume.

Got it, thanks Ulf for your explanation and also read your previous comments.

Remove Acked-by due to this till i give back.

Reviewed-by: Mukesh Savaliya <mukesh.savaliya@xxxxxxxxxxxxxxxx>