lkml.org 
[lkml]   [2019]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2019-06-19 16:21    [W:0.040 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site