Messages in this thread |  | | | From | Jörg-Volker Peetz <> | | Subject | Re: [PATCH 3/5] cleanups ntp.c (from Ingo) | | Date | Sat, 15 Mar 2008 10:32:42 +0100 |
| |
john stultz wrote: > Make this file more readable by applying a consistent coding style. > > No code changed. > > Signed-off-by: Ingo Molnar <mingo@elte.hu> > > Merged on top of Roman's very similar cleanups. > (In other words: Blame John for the merge screwups). > > Signed-off-by: John Stultz <johnstul@us.ibm.com> > > > Index: linux-2.6/kernel/time/ntp.c > =================================================================== <snip> > @@ -193,21 +197,20 @@ void second_overflow(void) > * 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; > } > } <snip>
Since you are at it, isn't "time_adj" a poor name since you also have a "time_adjust"? -- Regards, Jörg-Volker.
-- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |