diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2008-01-30 13:30:01 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 13:30:01 +0100 |
commit | 1d76c2622813fbc692b0d323028cfef9ee36051a (patch) | |
tree | c94e425658e6532273e4fd0fc5185cf069b5ee3f /include/linux/clocksource.h | |
parent | 186e3cb8a465bac010ee3b020768d2fa2b505aef (diff) | |
download | linux-1d76c2622813fbc692b0d323028cfef9ee36051a.tar.gz linux-1d76c2622813fbc692b0d323028cfef9ee36051a.tar.bz2 linux-1d76c2622813fbc692b0d323028cfef9ee36051a.zip |
clocksource: make CLOCKSOURCE_MASK bullet-proof
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: john stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/clocksource.h')
-rw-r--r-- | include/linux/clocksource.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 107787aacb64..07b42153de24 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h @@ -103,7 +103,7 @@ struct clocksource { #define CLOCK_SOURCE_VALID_FOR_HRES 0x20 /* simplify initialization of mask field */ -#define CLOCKSOURCE_MASK(bits) (cycle_t)(bits<64 ? ((1ULL<<bits)-1) : -1) +#define CLOCKSOURCE_MASK(bits) (cycle_t)((bits) < 64 ? ((1ULL<<(bits))-1) : -1) /** * clocksource_khz2mult - calculates mult from khz and shift |