From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Jason Baron <jbaron@akamai.com>,
"cpufreq@vger.kernel.org" <cpufreq@vger.kernel.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
Dirk Brandewie <dirk.j.brandewie@intel.com>,
"dirk.brandewie@gmail.com" <dirk.brandewie@gmail.com>
Subject: Re: [PATCH] cpufreq: Apply default governor for setpolicy drivers
Date: Thu, 19 Dec 2013 14:16:30 +0100 [thread overview]
Message-ID: <1482804.eoqBME3Grn@vostro.rjw.lan> (raw)
In-Reply-To: <CAKohpokxbAkXznyesdUAV7nhcdxMjcc=uOZE=hQhXnnD=bRNTw@mail.gmail.com>
On Thursday, December 19, 2013 10:57:06 AM Viresh Kumar wrote:
> On 19 December 2013 05:03, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> > + if (cpufreq_driver->setpolicy) {
> > + unsigned int ret;
> > +
> > + /* Use the default policyt if it is valid. */
> > + if (!cpufreq_parse_governor(policy->governor->name, &ret, NULL))
> > + new_policy.policy = ret;
> > + }
>
> What about this instead as cpufreq_parse_governor isn't supposed to change
> value of ret in case of errors.
>
> > + if (cpufreq_driver->setpolicy)
> > + cpufreq_parse_governor(policy->governor->name, &new_policy.policy, NULL);
Right, this is even better as far as the code goes, but adding a comment
describing the role of it would still be nice.
Thanks!
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
prev parent reply other threads:[~2013-12-19 13:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-18 20:31 [PATCH] cpufreq: Apply default governor for setpolicy drivers Jason Baron
2013-12-18 21:38 ` Rafael J. Wysocki
2013-12-18 21:35 ` Jason Baron
2013-12-18 23:33 ` Rafael J. Wysocki
2013-12-19 3:51 ` Jason Baron
2013-12-19 13:18 ` Rafael J. Wysocki
2013-12-19 5:27 ` Viresh Kumar
2013-12-19 13:16 ` Rafael J. Wysocki [this message]
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=1482804.eoqBME3Grn@vostro.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=cpufreq@vger.kernel.org \
--cc=dirk.brandewie@gmail.com \
--cc=dirk.j.brandewie@intel.com \
--cc=jbaron@akamai.com \
--cc=linux-pm@vger.kernel.org \
--cc=viresh.kumar@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