Re: [PATCH 2/2] cpufreq: simplify cpufreq_set_policy() interface

From: Viresh Kumar
Date: Tue Aug 19 2025 - 07:01:03 EST


On 19-08-25, 18:39, Zihuan Zhang wrote:
> static int cpufreq_set_policy(struct cpufreq_policy *policy,
> - struct cpufreq_governor *new_gov,
> - unsigned int new_pol);
> + struct cpufreq_governor *new_gov);

A driver will either support the policy or the governor. If we are
keeping `new_gov` around, I don't see why `new_pol` should be dropped.
And changing the policy for a `setpolicy` driver should happen from
within cpufreq_set_policy() instead of the caller. Also there is at
least one case (verify()) where we may end up returning early, before
changing the policy.

--
viresh