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

Krzysztof Kozlowski krzk at kernel.org
Wed Sep 3 01:58:11 AEST 2025


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



More information about the Linuxppc-dev mailing list