diff mbox series

cpufreq: pcc-cpufreq: Remove redundant exit() functions

Message ID 20240409125003.3444-1-sensor1010@163.com (mailing list archive)
State Not Applicable, archived
Headers show
Series cpufreq: pcc-cpufreq: Remove redundant exit() functions | expand

Commit Message

李哲 April 9, 2024, 12:50 p.m. UTC
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(-)

Comments

Viresh Kumar April 12, 2024, 5:49 a.m. UTC | #1
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>
diff mbox series

Patch

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",
 };