Messages in this thread | | | Date | Wed, 19 Jun 2019 19:50:29 +0530 | From | Viresh Kumar <> | Subject | Re: [PATCH 4/6] cpufreq: Use has_target() instead of !setpolicy |
| |
On 19-06-19, 14:28, Rafael J. Wysocki wrote: > On Wed, Jun 19, 2019 at 1:36 PM Viresh Kumar <viresh.kumar@linaro.org> wrote: > > > > For code consistency, use has_target() instead of !setpolicy everywhere, > > as it is already done at several places. > > That's OK > > > Maybe we should also use !has_target() for setpolicy case to use only one expression > > for this differentiation. > > But I'm not sure what you mean here?
At many places in code we are doing tests like:
if (cpufreq_driver->setpolicy) { xxx }
Maybe we can write them as well like:
if (!has_target()) { xxx }
-- viresh
| |