clockevents: Use u32 for mult and shift factors
authorThomas Gleixner <tglx@linutronix.de>
Wed, 11 Nov 2009 14:05:25 +0000 (14:05 +0000)
committer黄涛 <huangtao@rock-chips.com>
Mon, 25 Jul 2011 01:29:10 +0000 (09:29 +0800)
commitb7ad2a012ab29b9c7ebf9679b0b69a41165abc48
tree667aac1c4432524cc2f42624d636325bffa2d5a5
parent7c2793efef705019f4f7dd87574fe86ba81125eb
clockevents: Use u32 for mult and shift factors

The mult and shift factors of clock events differ in their data type
from those of clock sources for no reason. u32 is sufficient for
both. shift is always <= 32 and mult is limited to 2^32-1 to avoid
64bit multiplication overflows in the conversion.

Preparatory patch for a generic mult/shift factor calculation
function.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Mikael Pettersson <mikpe@it.uu.se>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Cc: John Stultz <johnstul@us.ibm.com>
LKML-Reference: <20091111134229.725664788@linutronix.de>
include/linux/clockchips.h
kernel/time/timer_list.c