Subject: Re: [PATCH v3 04/12] cpufreq: longhaul: Use scope-based cleanup helper

From: Krzysztof Kozlowski <[email-masked]>
Date: Tue, 2 Sep 2025 17:58:11 +0200

On 01/09/2025 10:57, Zihuan Zhang wrote:
>  static void __exit longhaul_exit(void)
>  {
> -	struct cpufreq_policy *policy = cpufreq_cpu_get(0);
> +	struct cpufreq_policy *policy __free(put_cpufreq_policy) = cpufreq_cpu_get(0);
>  	int i;
>  
>  	for (i = 0; i < numscales; i++) {
> @@ -968,7 +968,6 @@ static void __exit longhaul_exit(void)
>  		}
>  	}
>  
> -	cpufreq_cpu_put(policy);

You are not improving any code here.

Best regards,
Krzysztof