lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Thu, 03 Oct 2013 13:02:45 +0530
From:	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
To:	Viresh Kumar <viresh.kumar@...aro.org>
CC:	rjw@...k.pl, cpufreq@...r.kernel.org, linux-pm@...r.kernel.org,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH RESEND 09/11] cpufreq: rewrite cpufreq_driver->flags using
 shift operator

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@...aro.org>
> ---

Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@...ux.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);
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ