Make this file more readable by applying a consistent coding style.<snip>
No code changed.
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
Merged on top of Roman's very similar cleanups.
(In other words: Blame John for the merge screwups).
Signed-off-by: John Stultz <johnstul@xxxxxxxxxx>
Index: linux-2.6/kernel/time/ntp.c
===================================================================
@@ -193,21 +197,20 @@ void second_overflow(void)<snip>
* Compute the phase adjustment for the next second. The offset is
* reduced by a fixed factor times the time constant.
*/
- tick_length = tick_length_base;
- time_adj = shift_right(time_offset, SHIFT_PLL + time_constant);
- time_offset -= time_adj;
- tick_length += time_adj;
+ tick_length = tick_length_base;
+ time_adj = shift_right(time_offset, SHIFT_PLL + time_constant);
+ time_offset -= time_adj;
+ tick_length += time_adj;
if (unlikely(time_adjust)) {
- if (time_adjust > MAX_TICKADJ) {
- time_adjust -= MAX_TICKADJ;
- tick_length += MAX_TICKADJ_SCALED;
- } else if (time_adjust < -MAX_TICKADJ) {
- time_adjust += MAX_TICKADJ;
- tick_length -= MAX_TICKADJ_SCALED;
+ if (time_adjust > max_tickadj) {
+ time_adjust -= max_tickadj;
+ tick_length += scale_tickadj(max_tickadj);
+ } else if (time_adjust < -max_tickadj) {
+ time_adjust += max_tickadj;
+ tick_length -= scale_tickadj(max_tickadj);
} else {
- tick_length += (s64)(time_adjust * NSEC_PER_USEC /
- NTP_INTERVAL_FREQ) << NTP_SCALE_SHIFT;
+ tick_length += scale_tickadj(time_adjust);
time_adjust = 0;
}
}