[PATCH] pmdomain: arm: scmi_pm_domain: Remove redundant state verification
Peng Fan
peng.fan at nxp.com
Fri Mar 14 03:29:00 PDT 2025
> Subject: [PATCH] pmdomain: arm: scmi_pm_domain: Remove
> redundant state verification
>
> Currently, scmi_pd_power() explicitly verifies whether the requested
> power state was applied by calling state_get(). While this check could
> detect failures where the state was not properly updated, ensuring
> correctness is the responsibility of the SCMI firmware.
>
> Removing this redundant state_get() call eliminates an unnecessary
> round-trip to the firmware, improving efficiency. Any mismatches
> between the requested and actual states should be handled by the
> SCMI firmware, which must return a failure if state_set() is unsuccessful.
>
> Additionally, in some cases, checking the state after powering off a
> domain may be unreliable or unsafe, depending on the firmware
> implementation.
>
> This patch removes the redundant verification, simplifying the function
> without compromising correctness.
>
> Cc: Peng Fan <peng.fan at nxp.com>
> Cc: Ulf Hansson <ulf.hansson at linaro.org>
> Cc: Cristian Marussi <cristian.marussi at arm.com>
> Reported-and-tested-by: Ranjani Vaidyanathan
> <ranjani.vaidyanathan at nxp.com>
> Signed-off-by: Sudeep Holla <sudeep.holla at arm.com>
> ---
Reviewed-by: Peng Fan <peng.fan at nxp.com>
More information about the linux-arm-kernel
mailing list