cpufreq: intel_pstate: fix intel_pstate_exit_perf_limits prototype
diff mbox

Message ID 20161125165036.195969-1-arnd@arndb.de
State Accepted, archived
Delegated to: Rafael Wysocki
Headers show

Commit Message

Arnd Bergmann Nov. 25, 2016, 4:50 p.m. UTC
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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/cpufreq/intel_pstate.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Rafael J. Wysocki Nov. 25, 2016, 9:10 p.m. UTC | #1
On Fri, Nov 25, 2016 at 5:50 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> 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")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Applied, thanks!

Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Viresh Kumar Nov. 28, 2016, 4:14 a.m. UTC | #2
On 25-11-16, 17:50, Arnd Bergmann wrote:
> 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")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/cpufreq/intel_pstate.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
> index 7159dbde0160..8921686b8cd2 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -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

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

Patch
diff mbox

diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 7159dbde0160..8921686b8cd2 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -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