clockchips: convert the code format to BIT()
PATCH 1/1 clockchips: convert the code format to BIT()
Use BIT() to do some clean-up.
Signed-off-by Yangtao Li <[email protected]>
--- include/linux/clockchips.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
include/linux/clockchips.h +8 -8
@@ -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
Signature · 1 line
2.17.0
Quoted 3 lines · Yangtao Li
Use
BIT()to do some clean-up.Signed-off-by Yangtao Li <[email protected]>
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.
Quoted 37 lines
--- include/linux/clockchips.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)include/linux/clockchips.h +6
-7@@ -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)
include/linux/clockchips.h enum clock_event_state { · line 71
Quoted 10 lines
include/linux/clockchips.h +2
-1+# 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.
Signature · 1 line
~Randy