lkml.org 
[lkml]   [2016]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 09/12] clocksource: add J-Core PIT/RTC driver
From
Date
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

\
 
 \ /
  Last update: 2016-05-21 18:21    [W:0.069 / U:1.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site