OSDN Git Service

cpufreq: governor: Don't WARN on invalid states
authorViresh Kumar <viresh.kumar@linaro.org>
Sat, 18 Jul 2015 06:01:02 +0000 (11:31 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 20 Jul 2015 23:12:02 +0000 (01:12 +0200)
With previous commit, governors have started to return errors on invalid
state-transition requests. We already have a WARN for an invalid
state-transition request in cpufreq_governor_dbs(). This does trigger
today, as the sequence of events isn't guaranteed by cpufreq core.

Lets stop warning on that for now, and make sure we don't enter an
invalid state.

Reviewed-and-tested-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq_governor.c

index f225dc9..939197f 100644 (file)
@@ -543,7 +543,7 @@ int cpufreq_governor_dbs(struct cpufreq_policy *policy,
        else
                dbs_data = cdata->gdbs_data;
 
-       if (WARN_ON(!dbs_data && (event != CPUFREQ_GOV_POLICY_INIT))) {
+       if (!dbs_data && (event != CPUFREQ_GOV_POLICY_INIT)) {
                ret = -EINVAL;
                goto unlock;
        }