Linux-PM Archive mirror
 help / color / mirror / Atom feed
* [PATCH] cpufreq: pcc-cpufreq: Remove redundant exit() functions
@ 2024-04-09 12:50 Lizhe
  2024-04-12  5:49 ` Viresh Kumar
  0 siblings, 1 reply; 2+ messages in thread
From: Lizhe @ 2024-04-09 12:50 UTC (permalink / raw
  To: rafael, viresh.kumar, ilpo.jarvinen; +Cc: linux-pm, linux-kernel, Lizhe

The return value of exit() is 0 and it performs no action.
This function can be omitted. Please refer to the end condition
check in the __cpufreq_offline() function.

Signed-off-by: Lizhe <sensor1010@163.com>
---
 drivers/cpufreq/pcc-cpufreq.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/cpufreq/pcc-cpufreq.c b/drivers/cpufreq/pcc-cpufreq.c
index 6f8b5ea7aeae..771efbf51a48 100644
--- a/drivers/cpufreq/pcc-cpufreq.c
+++ b/drivers/cpufreq/pcc-cpufreq.c
@@ -562,18 +562,12 @@ static int pcc_cpufreq_cpu_init(struct cpufreq_policy *policy)
 	return result;
 }
 
-static int pcc_cpufreq_cpu_exit(struct cpufreq_policy *policy)
-{
-	return 0;
-}
-
 static struct cpufreq_driver pcc_cpufreq_driver = {
 	.flags = CPUFREQ_CONST_LOOPS,
 	.get = pcc_get_freq,
 	.verify = pcc_cpufreq_verify,
 	.target = pcc_cpufreq_target,
 	.init = pcc_cpufreq_cpu_init,
-	.exit = pcc_cpufreq_cpu_exit,
 	.name = "pcc-cpufreq",
 };
 
-- 
2.25.1


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

* Re: [PATCH] cpufreq: pcc-cpufreq: Remove redundant exit() functions
  2024-04-09 12:50 [PATCH] cpufreq: pcc-cpufreq: Remove redundant exit() functions Lizhe
@ 2024-04-12  5:49 ` Viresh Kumar
  0 siblings, 0 replies; 2+ messages in thread
From: Viresh Kumar @ 2024-04-12  5:49 UTC (permalink / raw
  To: Lizhe; +Cc: rafael, ilpo.jarvinen, linux-pm, linux-kernel

On 09-04-24, 05:50, Lizhe wrote:
> The return value of exit() is 0 and it performs no action.
> This function can be omitted. Please refer to the end condition
> check in the __cpufreq_offline() function.
> 
> Signed-off-by: Lizhe <sensor1010@163.com>
> ---
>  drivers/cpufreq/pcc-cpufreq.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/cpufreq/pcc-cpufreq.c b/drivers/cpufreq/pcc-cpufreq.c
> index 6f8b5ea7aeae..771efbf51a48 100644
> --- a/drivers/cpufreq/pcc-cpufreq.c
> +++ b/drivers/cpufreq/pcc-cpufreq.c
> @@ -562,18 +562,12 @@ static int pcc_cpufreq_cpu_init(struct cpufreq_policy *policy)
>  	return result;
>  }
>  
> -static int pcc_cpufreq_cpu_exit(struct cpufreq_policy *policy)
> -{
> -	return 0;
> -}
> -
>  static struct cpufreq_driver pcc_cpufreq_driver = {
>  	.flags = CPUFREQ_CONST_LOOPS,
>  	.get = pcc_get_freq,
>  	.verify = pcc_cpufreq_verify,
>  	.target = pcc_cpufreq_target,
>  	.init = pcc_cpufreq_cpu_init,
> -	.exit = pcc_cpufreq_cpu_exit,
>  	.name = "pcc-cpufreq",
>  };

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

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

end of thread, other threads:[~2024-04-12  5:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-09 12:50 [PATCH] cpufreq: pcc-cpufreq: Remove redundant exit() functions Lizhe
2024-04-12  5:49 ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).