linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Rafael Wysocki <rjw@rjwysocki.net>,
	Linux PM <linux-pm@vger.kernel.org>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 4/6] cpufreq: Use has_target() instead of !setpolicy
Date: Wed, 19 Jun 2019 19:50:29 +0530	[thread overview]
Message-ID: <20190619142029.4nxlgywlayx4fzpa@vireshk-i7> (raw)
In-Reply-To: <CAJZ5v0gmkAS-A2eT5VUyuBMD9+FfsM0HL-HPeUYUV24_oMTvVw@mail.gmail.com>

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

  reply	other threads:[~2019-06-19 14:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-19 11:35 [PATCH 0/6] cpufreq: cleanups Viresh Kumar
2019-06-19 11:35 ` [PATCH 1/6] cpufreq: Remove the redundant !setpolicy check Viresh Kumar
2019-06-19 11:35 ` [PATCH 2/6] cpufreq: Replace few CPUFREQ_CONST_LOOPS checks with has_target() Viresh Kumar
2019-06-19 12:20   ` Rafael J. Wysocki
2019-06-19 14:18     ` Viresh Kumar
2019-06-19 11:35 ` [PATCH 3/6] cpufreq: Remove the has_target() check from notifier handler Viresh Kumar
2019-06-19 12:25   ` Rafael J. Wysocki
2019-06-19 14:19     ` Viresh Kumar
2019-06-19 11:35 ` [PATCH 4/6] cpufreq: Use has_target() instead of !setpolicy Viresh Kumar
2019-06-19 12:28   ` Rafael J. Wysocki
2019-06-19 14:20     ` Viresh Kumar [this message]
2019-06-19 11:35 ` [PATCH 5/6] cpufreq: Reuse cpufreq_update_current_freq() in __cpufreq_get() Viresh Kumar
2019-06-19 11:35 ` [PATCH 6/6] cpufreq: Avoid calling cpufreq_verify_current_freq() from handle_update() Viresh Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190619142029.4nxlgywlayx4fzpa@vireshk-i7 \
    --to=viresh.kumar@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=vincent.guittot@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).