aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2019-10-22 15:47:57 +0530
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-11-04 11:44:26 +0100
commit737ffb27f2f1a8fe6644cac535486f7f25bbf6cb (patch)
treef33d823defe543a04ee81b14edf3d0d9cca274bb /drivers/cpufreq
parentLinux 5.4-rc5 (diff)
downloadlinux-dev-737ffb27f2f1a8fe6644cac535486f7f25bbf6cb.tar.xz
linux-dev-737ffb27f2f1a8fe6644cac535486f7f25bbf6cb.zip
cpufreq: Clarify the comment in cpufreq_set_policy()
One of the responsibility of the ->verify() callback is to make sure that the policy's min frequency is <= max frequency as this isn't guaranteed by the QoS framework which gave us those values. Update the comment in cpufreq_set_policy() to clarify that. Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> [ rjw: Minor changes of the new comment ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/cpufreq.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 48a224a6b178..dd1628192310 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -2385,7 +2385,10 @@ int cpufreq_set_policy(struct cpufreq_policy *policy,
new_policy->min = freq_qos_read_value(&policy->constraints, FREQ_QOS_MIN);
new_policy->max = freq_qos_read_value(&policy->constraints, FREQ_QOS_MAX);
- /* verify the cpu speed can be set within this limit */
+ /*
+ * Verify that the CPU speed can be set within these limits and make sure
+ * that min <= max.
+ */
ret = cpufreq_driver->verify(new_policy);
if (ret)
return ret;