ntp: Remove unused tick_nsec
authorThomas Gleixner <tglx@linutronix.de>
Wed, 11 Sep 2024 13:17:37 +0000 (15:17 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 2 Oct 2024 14:53:38 +0000 (16:53 +0200)
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
arch/x86/include/asm/timer.h
include/linux/timex.h
kernel/time/ntp.c

index 7365dd4acffb654d4c2ab3f15a9f85ee3f0c35f0..23baf8c9b34ca7ceb4c425ef90d038bf882c22e6 100644 (file)
@@ -6,8 +6,6 @@
 #include <linux/interrupt.h>
 #include <linux/math64.h>
 
-#define TICK_SIZE (tick_nsec / 1000)
-
 unsigned long long native_sched_clock(void);
 extern void recalibrate_cpu_khz(void);
 
index 3871b06bd302ceb8e999b364c85eece21eaeac1f..7f7a12fd8200ce83d97073e361929d47a98bb8e4 100644 (file)
@@ -145,7 +145,6 @@ unsigned long random_get_entropy_fallback(void);
  * estimated error = NTP dispersion.
  */
 extern unsigned long tick_usec;                /* USER_HZ period (usec) */
-extern unsigned long tick_nsec;                /* SHIFTED_HZ period (nsec) */
 
 /* Required to safely shift negative values */
 #define shift_right(x, s) ({   \
index 802b336f4b8c2f6e92b9b4c765182efaa0574efd..c17cc9d857bc1121156371fd1d1bd53d6400debb 100644 (file)
@@ -33,9 +33,6 @@
 /* USER_HZ period (usecs): */
 unsigned long                  tick_usec = USER_TICK_USEC;
 
-/* SHIFTED_HZ period (nsecs): */
-unsigned long                  tick_nsec;
-
 static u64                     tick_length;
 static u64                     tick_length_base;
 
@@ -253,8 +250,8 @@ static inline int ntp_synced(void)
  */
 
 /*
- * Update (tick_length, tick_length_base, tick_nsec), based
- * on (tick_usec, ntp_tick_adj, time_freq):
+ * Update tick_length and tick_length_base, based on tick_usec, ntp_tick_adj and
+ * time_freq:
  */
 static void ntp_update_frequency(void)
 {
@@ -267,7 +264,6 @@ static void ntp_update_frequency(void)
        second_length           += ntp_tick_adj;
        second_length           += time_freq;
 
-       tick_nsec                = div_u64(second_length, HZ) >> NTP_SCALE_SHIFT;
        new_base                 = div_u64(second_length, NTP_INTERVAL_FREQ);
 
        /*