[PATCH v2 1/3] clocksource: timer-keystone: introduce clocksource driver for Keystone

ivan.khoronzhuk ivan.khoronzhuk at ti.com
Tue Dec 24 03:36:43 EST 2013


On 12/24/2013 02:58 AM, Stephen Boyd wrote:
> On 12/17, Ivan Khoronzhuk wrote:
>> +static void __init keystone_timer_init(struct device_node *np)
>> +{
>> +	struct clock_event_device *event_dev = &timer.event_dev;
>> +	unsigned long rate;
> [...]
>> +
>> +	timer.hz_period = rate / (HZ);
>
> Unnecessary parentheses here. Also, do you need to use do_div()
> here? I'm lost how the hz_period is ever greater than 32 bits
> though because HZ is most likely very small and the rate is
> unsigned long.
>

You are right.
I'll do the following:

timer.hz_period = rate / (HZ)	---> timer.hz_period = rate / HZ
u64 hz_period			---> unsigned long hz_period

-- 
Regards,
Ivan Khoronzhuk



More information about the linux-arm-kernel mailing list