Re: [PATCH v2 09/12] clocksource: add J-Core PIT/RTC driver

From: Rob Landley
Date: Sat May 21 2016 - 11:56:02 EST


On 05/20/2016 10:15 PM, Rich Felker wrote:
> On Fri, May 20, 2016 at 04:01:56PM +0200, Daniel Lezcano wrote:
>>> + return ((u64)sechi << 32 | seclo) * 1000000000 + nsec;
>>
>> s/1000000000/NSEC_PER_SEC/
...
>>> + hwirq = irq_get_irq_data(pit_irq)->hwirq;
>>> + enable_val = (1<<26) | ((hwirq&0x3c)<<18) | (hwirq<<12);
>>
>> Can you explain? (and replace litterals by macros).

"Hiding numbers that are used just once into defines to put them
out of sight does not really help readability." - Pavel Machek

http://lkml.iu.edu/hypermail/linux/kernel/1407.1/00299.html

Rob