Re: [RFC][PATCH] NTP shiftR cleanup

From: YOSHIFUJI Hideaki / 吉藤英明
Date: Fri Sep 09 2005 - 20:15:11 EST


In article <1126314217.3455.10.camel@xxxxxxxxxxxxxxxxxxxxx> (at Fri, 09 Sep 2005 18:03:37 -0700), john stultz <johnstul@xxxxxxxxxx> says:

> diff --git a/kernel/time.c b/kernel/time.c
> --- a/kernel/time.c
> +++ b/kernel/time.c
> @@ -338,30 +338,20 @@ int do_adjtimex(struct timex *txc)
> if (mtemp >= MINSEC) {
> ltemp = (time_offset / mtemp) << (SHIFT_USEC -
> SHIFT_UPDATE);
> - if (ltemp < 0)
> - time_freq -= -ltemp >> SHIFT_KH;
> - else
> - time_freq += ltemp >> SHIFT_KH;
> + time_freq = shiftR(ltemp, SHIFT_KH);
> } else /* calibration interval too short (p. 12) */
> result = TIME_ERROR;

Maybe, "time_freq += shiftR(ltemp, SHIFT_KH);"?

--yoshfuji
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/