Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 659bc17b authored by pang.xunlei's avatar pang.xunlei Committed by John Stultz
Browse files

time: Complete NTP adjustment threshold judging conditions



The clocksource mult-adjustment threshold is [mult-maxadj, mult+maxadj],
timekeeping_adjust() only deals with the upper threshold, but misses the
lower threshold.

This patch adds the lower threshold judging condition.

Signed-off-by: default avatarpang.xunlei <pang.xunlei@linaro.org>
[jstultz: Minor fix for > 80 char line]
Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
parent 6067dc5a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1403,7 +1403,8 @@ static void timekeeping_adjust(struct timekeeper *tk, s64 offset)
	}

	if (unlikely(tk->tkr.clock->maxadj &&
		(tk->tkr.mult > tk->tkr.clock->mult + tk->tkr.clock->maxadj))) {
		(abs(tk->tkr.mult - tk->tkr.clock->mult)
			> tk->tkr.clock->maxadj))) {
		printk_once(KERN_WARNING
			"Adjusting %s more than 11%% (%ld vs %ld)\n",
			tk->tkr.clock->name, (long)tk->tkr.mult,