All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next] cpufreq: tegra194: Remove the unneeded result variable
@ 2022-08-31  3:32 cgel.zte
  2022-09-01  4:12 ` Viresh Kumar
  0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-08-31  3:32 UTC (permalink / raw)
  To: rafael
  Cc: viresh.kumar, thierry.reding, jonathanh, linux-pm, linux-tegra,
	ye xingchen, Zeal Robot

From: ye xingchen <ye.xingchen@zte.com.cn>

Return the value smp_call_function_single() directly instead of storing it
 in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
 drivers/cpufreq/tegra194-cpufreq.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/cpufreq/tegra194-cpufreq.c b/drivers/cpufreq/tegra194-cpufreq.c
index 1216046cf4c2..7e143c06972e 100644
--- a/drivers/cpufreq/tegra194-cpufreq.c
+++ b/drivers/cpufreq/tegra194-cpufreq.c
@@ -314,11 +314,7 @@ static void tegra194_get_cpu_ndiv_sysreg(void *ndiv)
 
 static int tegra194_get_cpu_ndiv(u32 cpu, u32 cpuid, u32 clusterid, u64 *ndiv)
 {
-	int ret;
-
-	ret = smp_call_function_single(cpu, tegra194_get_cpu_ndiv_sysreg, &ndiv, true);
-
-	return ret;
+	return smp_call_function_single(cpu, tegra194_get_cpu_ndiv_sysreg, &ndiv, true);
 }
 
 static void tegra194_set_cpu_ndiv_sysreg(void *data)
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH linux-next] cpufreq: tegra194: Remove the unneeded result variable
  2022-08-31  3:32 [PATCH linux-next] cpufreq: tegra194: Remove the unneeded result variable cgel.zte
@ 2022-09-01  4:12 ` Viresh Kumar
  0 siblings, 0 replies; 2+ messages in thread
From: Viresh Kumar @ 2022-09-01  4:12 UTC (permalink / raw)
  To: cgel.zte
  Cc: rafael, thierry.reding, jonathanh, linux-pm, linux-tegra,
	ye xingchen, Zeal Robot

On 31-08-22, 03:32, cgel.zte@gmail.com wrote:
> From: ye xingchen <ye.xingchen@zte.com.cn>
> 
> Return the value smp_call_function_single() directly instead of storing it
>  in another redundant variable.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
> ---
>  drivers/cpufreq/tegra194-cpufreq.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/cpufreq/tegra194-cpufreq.c b/drivers/cpufreq/tegra194-cpufreq.c
> index 1216046cf4c2..7e143c06972e 100644
> --- a/drivers/cpufreq/tegra194-cpufreq.c
> +++ b/drivers/cpufreq/tegra194-cpufreq.c
> @@ -314,11 +314,7 @@ static void tegra194_get_cpu_ndiv_sysreg(void *ndiv)
>  
>  static int tegra194_get_cpu_ndiv(u32 cpu, u32 cpuid, u32 clusterid, u64 *ndiv)
>  {
> -	int ret;
> -
> -	ret = smp_call_function_single(cpu, tegra194_get_cpu_ndiv_sysreg, &ndiv, true);
> -
> -	return ret;
> +	return smp_call_function_single(cpu, tegra194_get_cpu_ndiv_sysreg, &ndiv, true);
>  }
>  
>  static void tegra194_set_cpu_ndiv_sysreg(void *data)

Applied. Thanks.

-- 
viresh

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-01  4:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-31  3:32 [PATCH linux-next] cpufreq: tegra194: Remove the unneeded result variable cgel.zte
2022-09-01  4:12 ` Viresh Kumar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.