From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: rjw@sisk.pl, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RESEND 09/11] cpufreq: rewrite cpufreq_driver->flags using shift operator
Date: Thu, 03 Oct 2013 13:02:45 +0530 [thread overview]
Message-ID: <524D1D9D.9080908@linux.vnet.ibm.com> (raw)
In-Reply-To: <7b34bf61846bed19e4a7e8ee18a55e717c570fef.1380703248.git.viresh.kumar@linaro.org>
On 10/02/2013 02:13 PM, Viresh Kumar wrote:
> Currently cpufreq_driver's flags are defined directly using 0x1, 0x2, 0x4, 0x8,
> etc.. As the list grows it doesn't stays much readable..
>
> Lets use bitwise shift operator << to generate these numbers for respective
> positions.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Regards,
Srivatsa S. Bhat
> include/linux/cpufreq.h | 15 ++++++++-------
> 1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
> index a72bac2..9321059 100644
> --- a/include/linux/cpufreq.h
> +++ b/include/linux/cpufreq.h
> @@ -225,13 +225,14 @@ struct cpufreq_driver {
> };
>
> /* flags */
> -#define CPUFREQ_STICKY 0x01 /* the driver isn't removed even if
> - * all ->init() calls failed */
> -#define CPUFREQ_CONST_LOOPS 0x02 /* loops_per_jiffy or other kernel
> - * "constants" aren't affected by
> - * frequency transitions */
> -#define CPUFREQ_PM_NO_WARN 0x04 /* don't warn on suspend/resume speed
> - * mismatches */
> +#define CPUFREQ_STICKY (1 << 0) /* driver isn't removed even if
> + all ->init() calls failed */
> +#define CPUFREQ_CONST_LOOPS (1 << 1) /* loops_per_jiffy or other
> + kernel "constants" aren't
> + affected by frequency
> + transitions */
> +#define CPUFREQ_PM_NO_WARN (1 << 2) /* don't warn on suspend/resume
> + speed mismatches */
>
> int cpufreq_register_driver(struct cpufreq_driver *driver_data);
> int cpufreq_unregister_driver(struct cpufreq_driver *driver_data);
>
next prev parent reply other threads:[~2013-10-03 7:36 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-02 8:43 [PATCH RESEND 00/11] CPUFreq: Cleanups/fixes for v3.13 Viresh Kumar
2013-10-02 8:43 ` [PATCH RESEND 01/11] cpufreq: make return type of lock_policy_rwsem_{read|write}() as void Viresh Kumar
2013-10-03 7:09 ` Srivatsa S. Bhat
2013-10-02 8:43 ` [PATCH RESEND 02/11] cpufreq: create per policy rwsem instead of per cpu cpu_policy_rwsem Viresh Kumar
2013-10-03 7:23 ` Srivatsa S. Bhat
2013-10-02 8:43 ` [PATCH RESEND 03/11] cpufreq: remove invalid comment from __cpufreq_remove_dev() Viresh Kumar
2013-10-03 7:25 ` Srivatsa S. Bhat
2013-10-02 8:43 ` [PATCH RESEND 04/11] cpufreq: Remove extra blank line Viresh Kumar
2013-10-03 7:26 ` Srivatsa S. Bhat
2013-10-02 8:43 ` [PATCH RESEND 05/11] cpufreq: don't break string in print statements Viresh Kumar
2013-10-02 8:43 ` [PATCH RESEND 06/11] cpufreq: remove __cpufreq_remove_dev() Viresh Kumar
2013-10-02 8:43 ` [PATCH RESEND 07/11] cpufreq: Optimize cpufreq_frequency_table_verify() Viresh Kumar
2013-10-02 8:43 ` [PATCH RESEND 08/11] cpufreq: rename __cpufreq_set_policy() as cpufreq_set_policy() Viresh Kumar
2013-10-02 8:43 ` [PATCH RESEND 09/11] cpufreq: rewrite cpufreq_driver->flags using shift operator Viresh Kumar
2013-10-03 7:32 ` Srivatsa S. Bhat [this message]
2013-10-02 8:43 ` [PATCH RESEND 10/11] cpufreq: use cpufreq_driver->flags to mark CPUFREQ_HAVE_GOVERNOR_PER_POLICY Viresh Kumar
2013-10-03 7:39 ` Srivatsa S. Bhat
2013-10-02 8:43 ` [PATCH RESEND 11/11] cpufreq: add new routine cpufreq_verify_within_cpu_limits() Viresh Kumar
2013-10-02 17:40 ` Dirk Brandewie
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=524D1D9D.9080908@linux.vnet.ibm.com \
--to=srivatsa.bhat@linux.vnet.ibm.com \
--cc=cpufreq@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@sisk.pl \
--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;
as well as URLs for NNTP newsgroup(s).