[14/16] cpufreq: interactive: Remove unnecessary cpu_online() check

Message ID 82c927127d191af76f3d609db49dd73c7cc03eda.1368696171.git.viresh.kumar@linaro.org
State Accepted
Headers show

Commit Message

Viresh Kumar May 16, 2013, 9:28 a.m.
Cpufreq no longer calls governor callback for offlined cpus. i.e. All
policy->cpus are guaranteed to be online. Hence we don't need explicit check to
see if cpu is online or not.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/cpufreq_interactive.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Todd Poynor June 2, 2013, 6:59 p.m. | #1
On Thu, May 16, 2013 at 2:28 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> Cpufreq no longer calls governor callback for offlined cpus. i.e. All
> policy->cpus are guaranteed to be online. Hence we don't need explicit check to
> see if cpu is online or not.

Will merge for a future android branch, thanks.

>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>  drivers/cpufreq/cpufreq_interactive.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c
> index 4ed2fed..baa5638 100644
> --- a/drivers/cpufreq/cpufreq_interactive.c
> +++ b/drivers/cpufreq/cpufreq_interactive.c
> @@ -992,9 +992,6 @@ static int cpufreq_governor_interactive(struct cpufreq_policy *policy,
>
>         switch (event) {
>         case CPUFREQ_GOV_START:
> -               if (!cpu_online(policy->cpu))
> -                       return -EINVAL;
> -
>                 mutex_lock(&gov_lock);
>
>                 freq_table =
> --
> 1.7.12.rc2.18.g61b472e
>

Patch

diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c
index 4ed2fed..baa5638 100644
--- a/drivers/cpufreq/cpufreq_interactive.c
+++ b/drivers/cpufreq/cpufreq_interactive.c
@@ -992,9 +992,6 @@  static int cpufreq_governor_interactive(struct cpufreq_policy *policy,
 
 	switch (event) {
 	case CPUFREQ_GOV_START:
-		if (!cpu_online(policy->cpu))
-			return -EINVAL;
-
 		mutex_lock(&gov_lock);
 
 		freq_table =