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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <dc8270f2-a500-5067-4535-11edadc6c7a4@infradead.org>
Date:   Wed, 16 Jan 2019 08:49:06 -0800
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Yangtao Li <tiny.windzz@...il.com>, tglx@...utronix.de,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] clockchips: convert the code format to BIT()

On 1/16/19 8:09 AM, Yangtao Li wrote:
> Use BIT() to do some clean-up.
> 
> Signed-off-by: Yangtao Li <tiny.windzz@...il.com>

Hi,

Looks to me like this header file needs to
#include <linux/bitops.h>
and not assume that the bitops.h header file will be pulled in
by some side effect.

> ---
>  include/linux/clockchips.h | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
> index 8ae9a95ebf5b..39a2294e995b 100644
> --- a/include/linux/clockchips.h
> +++ b/include/linux/clockchips.h
> @@ -43,9 +43,9 @@ enum clock_event_state {
>  /*
>   * Clock event features
>   */
> -# define CLOCK_EVT_FEAT_PERIODIC	0x000001
> -# define CLOCK_EVT_FEAT_ONESHOT		0x000002
> -# define CLOCK_EVT_FEAT_KTIME		0x000004
> +# define CLOCK_EVT_FEAT_PERIODIC	BIT(0)
> +# define CLOCK_EVT_FEAT_ONESHOT		BIT(1)
> +# define CLOCK_EVT_FEAT_KTIME		BIT(2)
>  
>  /*
>   * x86(64) specific (mis)features:
> @@ -53,19 +53,19 @@ enum clock_event_state {
>   * - Clockevent source stops in C3 State and needs broadcast support.
>   * - Local APIC timer is used as a dummy device.
>   */
> -# define CLOCK_EVT_FEAT_C3STOP		0x000008
> -# define CLOCK_EVT_FEAT_DUMMY		0x000010
> +# define CLOCK_EVT_FEAT_C3STOP		BIT(3)
> +# define CLOCK_EVT_FEAT_DUMMY		BIT(4)
>  
>  /*
>   * Core shall set the interrupt affinity dynamically in broadcast mode
>   */
> -# define CLOCK_EVT_FEAT_DYNIRQ		0x000020
> -# define CLOCK_EVT_FEAT_PERCPU		0x000040
> +# define CLOCK_EVT_FEAT_DYNIRQ		BIT(5)
> +# define CLOCK_EVT_FEAT_PERCPU		BIT(6)
>  
>  /*
>   * Clockevent device is based on a hrtimer for broadcast
>   */
> -# define CLOCK_EVT_FEAT_HRTIMER		0x000080
> +# define CLOCK_EVT_FEAT_HRTIMER		BIT(7)
>  
>  /**
>   * struct clock_event_device - clock event device descriptor
> 

ciao.
-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ