lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z6mKt1Wjvo4yuGdT@BLRRASHENOY1.amd.com>
Date: Mon, 10 Feb 2025 10:42:23 +0530
From: "Gautham R. Shenoy" <gautham.shenoy@....com>
To: Dhananjay Ugwekar <dhananjay.ugwekar@....com>
Cc: mario.limonciello@....com, rafael@...nel.org, viresh.kumar@...aro.org,
	linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org
Subject: Re: [PATCH 01/12] cpufreq/amd-pstate: Remove the goto label in
 amd_pstate_update_limits

On Wed, Feb 05, 2025 at 11:25:12AM +0000, Dhananjay Ugwekar wrote:
> Scope based guard/cleanup macros should not be used together with goto
> labels. Hence, remove the goto label.
> 
> Fixes: 6c093d5a5b73 ("cpufreq/amd-pstate: convert mutex use to guard()")
> Signed-off-by: Dhananjay Ugwekar <dhananjay.ugwekar@....com>


Reviewed-by: Gautham R. Shenoy <gautham.shenoy@....com>

-- 
Thanks and Regards
gautham.

> ---
>  drivers/cpufreq/amd-pstate.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
> index 7120f035c0be..b163c1699821 100644
> --- a/drivers/cpufreq/amd-pstate.c
> +++ b/drivers/cpufreq/amd-pstate.c
> @@ -838,8 +838,10 @@ static void amd_pstate_update_limits(unsigned int cpu)
>  	guard(mutex)(&amd_pstate_driver_lock);
>  
>  	ret = amd_get_highest_perf(cpu, &cur_high);
> -	if (ret)
> -		goto free_cpufreq_put;
> +	if (ret) {
> +		cpufreq_cpu_put(policy);
> +		return;
> +	}
>  
>  	prev_high = READ_ONCE(cpudata->prefcore_ranking);
>  	highest_perf_changed = (prev_high != cur_high);
> @@ -849,8 +851,6 @@ static void amd_pstate_update_limits(unsigned int cpu)
>  		if (cur_high < CPPC_MAX_PERF)
>  			sched_set_itmt_core_prio((int)cur_high, cpu);
>  	}
> -
> -free_cpufreq_put:
>  	cpufreq_cpu_put(policy);
>  
>  	if (!highest_perf_changed)
> -- 
> 2.34.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ