Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[safe/jmp/linux-2.6] / kernel / time / ntp.c
index a3fe7ef..7fc6437 100644 (file)
@@ -236,7 +236,7 @@ static enum hrtimer_restart ntp_leap_second(struct hrtimer *timer)
  */
 void second_overflow(void)
 {
-       s64 time_adj;
+       s64 delta;
 
        /* Bump the maxerror field */
        time_maxerror += MAXFREQ / NSEC_PER_USEC;
@@ -249,10 +249,11 @@ 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;
+
+       delta            = shift_right(time_offset, SHIFT_PLL + time_constant);
+       time_offset     -= delta;
+       tick_length     += delta;
 
        if (!time_adjust)
                return;
@@ -364,8 +365,6 @@ static inline void process_adj_status(struct timex *txc, struct timespec *ts)
                time_state = TIME_OK;
                time_status = STA_UNSYNC;
        }
-       /* only set allowed bits */
-       time_status &= STA_RONLY;
 
        /*
         * If we turn on PLL adjustments then reset the
@@ -374,6 +373,8 @@ static inline void process_adj_status(struct timex *txc, struct timespec *ts)
        if (!(time_status & STA_PLL) && (txc->status & STA_PLL))
                time_reftime = xtime.tv_sec;
 
+       /* only set allowed bits */
+       time_status &= STA_RONLY;
        time_status |= txc->status & ~STA_RONLY;
 
        switch (time_state) {