cpufreq: Detect spurious invocations of update_policy_cpu()
authorSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Thu, 12 Sep 2013 11:59:09 +0000 (17:29 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 16 Oct 2013 23:09:16 +0000 (01:09 +0200)
commit99ec899eafe2ec0a7dd96e9de5fa0a2bea3032ba
treef3772a586e3cdd622df90deb551b8bda31397cd5
parent891083622621bfe114ec4d40711a7d3a68fdc6fc
cpufreq: Detect spurious invocations of update_policy_cpu()

The function update_policy_cpu() is expected to be called when the policy->cpu
of a cpufreq policy is to be changed: ie., the new CPU nominated to become the
policy->cpu is different from the old one.

Print a warning if it is invoked with new_cpu == old_cpu, since such an
invocation might hint at a faulty logic in the caller.

Suggested-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq.c