Skip to contentSkip to conversation

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

PATCH In review Lizhe 2 participants 2 messages Apr 9, 2024 – Apr 12, 2024 CPU frequency scaling framework

lore
Share & tools
lore

Lizhe

author
#0 lore raw

PATCH 1/1 cpufreq: pcc-cpufreq: Remove redundant exit() functions

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.

---
 drivers/cpufreq/pcc-cpufreq.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/cpufreq/pcc-cpufreq.c +0 -6
index 6f8b5ea7aeae..771efbf51a48 100644
@@ -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",
 };
 
Signature · 1 line
2.25.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 21 lines · 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.

---
 drivers/cpufreq/pcc-cpufreq.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/cpufreq/pcc-cpufreq.c +0 -4
index 6f8b5ea7aeae..771efbf51a48 100644
@@ -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;
-}

drivers/cpufreq/pcc-cpufreq.c static int pcc_cpufreq_cpu_init(struct cpufreq_policy *policy) · line 572

Quoted 10 lines
drivers/cpufreq/pcc-cpufreq.c +0 -2
-
 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",
 };
Signature · 1 line
viresh