Skip to contentSkip to conversation

cpufreq: intel_pstate: fix intel_pstate_exit_perf_limits prototype

PATCH Applied Arnd Bergmann 3 participants 3 messages Nov 25, 2016 – Nov 28, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpufreq: intel_pstate: fix intel_pstate_exit_perf_limits prototype

The addition of the generic governor support marked the intel_pstate_exit_perf_limits as inline, which fixed a warning, but it introduced another warning:

drivers/cpufreq/intel_pstate.c: In function ‘intel_pstate_exit_perf_limits’:
drivers/cpufreq/intel_pstate.c:483:1: error: no return statement in function returning non-void [-Werror=return-type]

This changes it back to a 'void' return type, and changes the corresponding intel_pstate_init_acpi_perf_limits() function to be inline as well for consistency.

Fixes 001c76f05b01 ("cpufreq: intel_pstate: Generic governors support")
---
 drivers/cpufreq/intel_pstate.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/cpufreq/intel_pstate.c +2 -2
index 7159dbde0160..8921686b8cd2 100644
@@ -474,11 +474,11 @@ static void intel_pstate_exit_perf_limits(struct cpufreq_policy *policy)
 }
 
 #else
-static void intel_pstate_init_acpi_perf_limits(struct cpufreq_policy *policy)
+static inline void intel_pstate_init_acpi_perf_limits(struct cpufreq_policy *policy)
 {
 }
 
-static inline int intel_pstate_exit_perf_limits(struct cpufreq_policy *policy)
+static inline void intel_pstate_exit_perf_limits(struct cpufreq_policy *policy)
 {
 }
 #endif
Signature · 1 line
2.9.0
maintainer Applied
#1 lore raw
Quoted 7 lines · Arnd Bergmann

The addition of the generic governor support marked the intel_pstate_exit_perf_limits as inline, which fixed a warning, but it introduced another warning:

drivers/cpufreq/intel_pstate.c: In function ‘intel_pstate_exit_perf_limits’:
drivers/cpufreq/intel_pstate.c:483:1: error: no return statement in function returning non-void [-Werror=return-type]

Quoted 6 lines

This changes it back to a 'void' return type, and changes the corresponding intel_pstate_init_acpi_perf_limits() function to be inline as well for consistency.

Fixes 001c76f05b01 ("cpufreq: intel_pstate: Generic governors support")

Applied, thanks!

Rafael

maintainer Acked-by on v1 1/1
#2 lore raw
In reply to Arnd Bergmann
Quoted 25 lines · Arnd Bergmann

The addition of the generic governor support marked the intel_pstate_exit_perf_limits as inline, which fixed a warning, but it introduced another warning:

drivers/cpufreq/intel_pstate.c: In function ‘intel_pstate_exit_perf_limits’:
drivers/cpufreq/intel_pstate.c:483:1: error: no return statement in function returning non-void [-Werror=return-type]

This changes it back to a 'void' return type, and changes the corresponding intel_pstate_init_acpi_perf_limits() function to be inline as well for consistency.

Fixes 001c76f05b01 ("cpufreq: intel_pstate: Generic governors support")
---
 drivers/cpufreq/intel_pstate.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/cpufreq/intel_pstate.c +0 -0
index 7159dbde0160..8921686b8cd2 100644
@@ -474,11 +474,11 @@ static void intel_pstate_exit_perf_limits(struct cpufreq_policy *policy)
 }
 
 #else

drivers/cpufreq/intel_pstate.c static void intel_pstate_exit_perf_limits(struct cpufreq_policy *policy) · line 484

Quoted 10 lines
drivers/cpufreq/intel_pstate.c +2 -2
-static void intel_pstate_init_acpi_perf_limits(struct cpufreq_policy *policy)
+static inline void intel_pstate_init_acpi_perf_limits(struct cpufreq_policy *policy)
 {
 }
 
-static inline int intel_pstate_exit_perf_limits(struct cpufreq_policy *policy)
+static inline void intel_pstate_exit_perf_limits(struct cpufreq_policy *policy)
 {
 }
 #endif
Signature · 1 line
viresh