Skip to content

Commit

Permalink
clocksource: make CLOCKSOURCE_MASK bullet-proof
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Atsushi Nemoto authored and Ingo Molnar committed Jan 30, 2008
1 parent 186e3cb commit 1d76c26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/clocksource.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1d76c26

Please sign in to comment.