lkml.org 
[lkml]   [2016]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v7 3/8] time: Remove duplicated code in ktime_get_raw_and_real()
Date
From
On Mon, 15 Feb 2016 23:52:10 -0800, Richard Cochran  
<richardcochran@gmail.com> wrote:
>> @@ -888,6 +888,8 @@ void ktime_get_snapshot(struct system_time_snapshot
>> *systime_snapshot)
>> s64 nsec_real;
>> cycle_t now;
>>
>> + WARN_ON(timekeeping_suspended);
> ...
>> - WARN_ON_ONCE(timekeeping_suspended);
>
> Is this change intentional?

Yes it is. The code I replaced in pps_kernel.h (pps_get_ts()) has two call
paths depending on whether CONFIG_NTP_PPS is set. On one call path
(realtime only, config unset) WARN_ON(), from getnstimeofday64, is used,
on the other WARN_ON_ONCE(), from ktime_get_raw_and_real_ts64(), is used.
I opted for the greater verbosity of the two when I combined the code.

Is WARN_ON_ONCE() better here?

Thanks,
Chris

\
 
 \ /
  Last update: 2016-02-16 20:21    [W:0.067 / U:1.872 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site