Message ID | 4008d21f166accfb28180eb804cb8ebda6da4f4d.1560944014.git.viresh.kumar@linaro.org |
---|---|
State | New |
Headers | show |
Series | cpufreq: cleanups | expand |
On Wed, Jun 19, 2019 at 1:35 PM Viresh Kumar <viresh.kumar@linaro.org> wrote: > > cpufreq_notify_transition() is only called for has_target() type driver > and not for set_policy type, and the check is simply redundant. Remove > it. Ah, OK So this patch removes a check introduced by the previous one. :-) Please merge them together. > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> > --- > drivers/cpufreq/cpufreq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c > index e59194c2c613..41ac701e324f 100644 > --- a/drivers/cpufreq/cpufreq.c > +++ b/drivers/cpufreq/cpufreq.c > @@ -359,7 +359,7 @@ static void cpufreq_notify_transition(struct cpufreq_policy *policy, > * which is not equal to what the cpufreq core thinks is > * "old frequency". > */ > - if (has_target() && policy->cur && policy->cur != freqs->old) { > + if (policy->cur && policy->cur != freqs->old) { > pr_debug("Warning: CPU frequency is %u, cpufreq assumed %u kHz\n", > freqs->old, policy->cur); > freqs->old = policy->cur; > -- > 2.21.0.rc0.269.g1a574e7a288b >
On 19-06-19, 14:25, Rafael J. Wysocki wrote: > On Wed, Jun 19, 2019 at 1:35 PM Viresh Kumar <viresh.kumar@linaro.org> wrote: > > > > cpufreq_notify_transition() is only called for has_target() type driver > > and not for set_policy type, and the check is simply redundant. Remove > > it. > > Ah, OK > > So this patch removes a check introduced by the previous one. :-) > > Please merge them together. It made sense to keep them separate because there are two different issues I am fixing here. But if that is what you want, I will merge them. -- viresh
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index e59194c2c613..41ac701e324f 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -359,7 +359,7 @@ static void cpufreq_notify_transition(struct cpufreq_policy *policy, * which is not equal to what the cpufreq core thinks is * "old frequency". */ - if (has_target() && policy->cur && policy->cur != freqs->old) { + if (policy->cur && policy->cur != freqs->old) { pr_debug("Warning: CPU frequency is %u, cpufreq assumed %u kHz\n", freqs->old, policy->cur); freqs->old = policy->cur;
cpufreq_notify_transition() is only called for has_target() type driver and not for set_policy type, and the check is simply redundant. Remove it. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> --- drivers/cpufreq/cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.21.0.rc0.269.g1a574e7a288b