Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ntp: Remove unused tick_nsec

tick_nsec is only updated in the NTP core, but there are no users.

Remove it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: John Stultz <jstultz@google.com>
Link: https://lore.kernel.org/all/20240911-devel-anna-maria-b4-timers-ptp-ntp-v1-1-2d52f4e13476@linutronix.de

+2 -9
-2
arch/x86/include/asm/timer.h
··· 6 6 #include <linux/interrupt.h> 7 7 #include <linux/math64.h> 8 8 9 - #define TICK_SIZE (tick_nsec / 1000) 10 - 11 9 unsigned long long native_sched_clock(void); 12 10 extern void recalibrate_cpu_khz(void); 13 11
-1
include/linux/timex.h
··· 145 145 * estimated error = NTP dispersion. 146 146 */ 147 147 extern unsigned long tick_usec; /* USER_HZ period (usec) */ 148 - extern unsigned long tick_nsec; /* SHIFTED_HZ period (nsec) */ 149 148 150 149 /* Required to safely shift negative values */ 151 150 #define shift_right(x, s) ({ \
+2 -6
kernel/time/ntp.c
··· 33 33 /* USER_HZ period (usecs): */ 34 34 unsigned long tick_usec = USER_TICK_USEC; 35 35 36 - /* SHIFTED_HZ period (nsecs): */ 37 - unsigned long tick_nsec; 38 - 39 36 static u64 tick_length; 40 37 static u64 tick_length_base; 41 38 ··· 250 253 */ 251 254 252 255 /* 253 - * Update (tick_length, tick_length_base, tick_nsec), based 254 - * on (tick_usec, ntp_tick_adj, time_freq): 256 + * Update tick_length and tick_length_base, based on tick_usec, ntp_tick_adj and 257 + * time_freq: 255 258 */ 256 259 static void ntp_update_frequency(void) 257 260 { ··· 264 267 second_length += ntp_tick_adj; 265 268 second_length += time_freq; 266 269 267 - tick_nsec = div_u64(second_length, HZ) >> NTP_SCALE_SHIFT; 268 270 new_base = div_u64(second_length, NTP_INTERVAL_FREQ); 269 271 270 272 /*