diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-22 10:06:58 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-25 12:38:17 -0500 |
commit | 39854fe8c165872d743f6a0c4860ca2de8e45ac9 (patch) | |
tree | 1bc791cf9dea4ffb34e85c0064326aa911889255 | |
parent | 069569e025706f27f939785f86a94d5d8ce55dce (diff) |
time: ntp: clean up second_overflow()
Impact: cleanup, no functionality changed
The 'time_adj' local variable is named in a very confusing
way because it almost shadows the 'time_adjust' global
variable - which is used in this same function.
Rename it to 'delta' - to make them stand apart more clearly.
kernel/time/ntp.o:
text data bss dec hex filename
2545 114 144 2803 af3 ntp.o.before
2545 114 144 2803 af3 ntp.o.after
md5:
1bf0b3be564512279ba7cee299d1d2be ntp.o.before.asm
1bf0b3be564512279ba7cee299d1d2be ntp.o.after.asm
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | kernel/time/ntp.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index a3fe7ef2d83b..c74eb7d9d854 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c | |||
@@ -236,7 +236,7 @@ static enum hrtimer_restart ntp_leap_second(struct hrtimer *timer) | |||
236 | */ | 236 | */ |
237 | void second_overflow(void) | 237 | void second_overflow(void) |
238 | { | 238 | { |
239 | s64 time_adj; | 239 | s64 delta; |
240 | 240 | ||
241 | /* Bump the maxerror field */ | 241 | /* Bump the maxerror field */ |
242 | time_maxerror += MAXFREQ / NSEC_PER_USEC; | 242 | time_maxerror += MAXFREQ / NSEC_PER_USEC; |
@@ -249,10 +249,11 @@ void second_overflow(void) | |||
249 | * Compute the phase adjustment for the next second. The offset is | 249 | * Compute the phase adjustment for the next second. The offset is |
250 | * reduced by a fixed factor times the time constant. | 250 | * reduced by a fixed factor times the time constant. |
251 | */ | 251 | */ |
252 | tick_length = tick_length_base; | 252 | tick_length = tick_length_base; |
253 | time_adj = shift_right(time_offset, SHIFT_PLL + time_constant); | 253 | |
254 | time_offset -= time_adj; | 254 | delta = shift_right(time_offset, SHIFT_PLL + time_constant); |
255 | tick_length += time_adj; | 255 | time_offset -= delta; |
256 | tick_length += delta; | ||
256 | 257 | ||
257 | if (!time_adjust) | 258 | if (!time_adjust) |
258 | return; | 259 | return; |