Re: [PATCH 2/2] cpufreq: intel_pstate: Use CPUFREQ_POLICY_UNKNOWN

From: Rafael J. Wysocki
Date: Wed Dec 18 2024 - 09:52:57 EST


On Wed, Dec 11, 2024 at 1:26 PM Christian Loehle
<christian.loehle@xxxxxxx> wrote:
>
> epp_policy uses the same values as cpufreq_policy.policy and resets
> to CPUFREQ_POLICY_UNKNOWN during offlining. Be consistent about
> it and initialize to CPUFREQ_POLICY_UNKNOWN instead of 0, too.
>
> No functional change intended.
>
> Cc: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx>
> Cc: Len Brown <lenb@xxxxxxxxxx>
> Signed-off-by: Christian Loehle <christian.loehle@xxxxxxx>
> ---
> drivers/cpufreq/intel_pstate.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
> index b8e2396a708a..5dacd9d26879 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -2709,7 +2709,7 @@ static int intel_pstate_init_cpu(unsigned int cpunum)
> }
>
> cpu->epp_powersave = -EINVAL;
> - cpu->epp_policy = 0;
> + cpu->epp_policy = CPUFREQ_POLICY_UNKNOWN;
>
> intel_pstate_get_cpu_pstates(cpu);
>
> --

Applied as 6.14 material, thanks!