Skip to contentSkip to conversation

cpufreq: Remove redundant exit() functions

PATCH In review Lizhe 2 participants 3 messages Apr 9, 2024 – Apr 12, 2024 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

Lizhe

author
#0 lore raw

PATCH 1/1 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/cpufreq-nforce2.c   | 6 ------
 drivers/cpufreq/loongson2_cpufreq.c | 6 ------
 2 files changed, 12 deletions(-)
drivers/cpufreq/cpufreq-nforce2.c +0 -6
index f7a7bcf6f52e..fedad1081973 100644
@@ -359,11 +359,6 @@ static int nforce2_cpu_init(struct cpufreq_policy *policy)
 	return 0;
 }
 
-static int nforce2_cpu_exit(struct cpufreq_policy *policy)
-{
-	return 0;
-}
-
 static struct cpufreq_driver nforce2_driver = {
 	.name = "nforce2",
 	.flags = CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING,
@@ -371,7 +366,6 @@ static struct cpufreq_driver nforce2_driver = {
 	.target = nforce2_target,
 	.get = nforce2_get,
 	.init = nforce2_cpu_init,
-	.exit = nforce2_cpu_exit,
 };
 
 #ifdef MODULE
drivers/cpufreq/loongson2_cpufreq.c +0 -6
index afc59b292153..6a8e97896d38 100644
@@ -85,18 +85,12 @@ static int loongson2_cpufreq_cpu_init(struct cpufreq_policy *policy)
 	return 0;
 }
 
-static int loongson2_cpufreq_exit(struct cpufreq_policy *policy)
-{
-	return 0;
-}
-
 static struct cpufreq_driver loongson2_cpufreq_driver = {
 	.name = "loongson2",
 	.init = loongson2_cpufreq_cpu_init,
 	.verify = cpufreq_generic_frequency_table_verify,
 	.target_index = loongson2_cpufreq_target,
 	.get = cpufreq_generic_get,
-	.exit = loongson2_cpufreq_exit,
 	.attr = cpufreq_generic_attr,
 };
 
Signature · 1 line
2.25.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 9 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/cpufreq-nforce2.c   | 6 ------
 drivers/cpufreq/loongson2_cpufreq.c | 6 ------
 2 files changed, 12 deletions(-)
Signature · 1 line
viresh

A message that is not in the archive (sent off-list or not yet received): 1355118777.446339.1712756972631.JavaMail.root@mail-tracker-145-3ep34-c9h23-5f64cf7787-82gdh

maintainer
#3 lore raw
Quoted 5 lines · lizhe

Hi,
I have already tested it, it is functioning properly, Please review.

Please don't expect reply within a day from maintainers. Give at least two weeks before posting another email to remind people.

Signature · 1 line
viresh