ntp: Make tick_usec static
authorThomas Gleixner <tglx@linutronix.de>
Wed, 11 Sep 2024 13:17:38 +0000 (15:17 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 2 Oct 2024 14:53:38 +0000 (16:53 +0200)
There are no users of tick_usec outside of the NTP core code. Therefore
make tick_usec static.

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-2-2d52f4e13476@linutronix.de
include/linux/timex.h
kernel/time/ntp.c

index 7f7a12fd8200ce83d97073e361929d47a98bb8e4..4ee32eff3f221445884213f84a1122e906167056 100644 (file)
@@ -139,13 +139,6 @@ unsigned long random_get_entropy_fallback(void);
 #define MAXSEC 2048            /* max interval between updates (s) */
 #define NTP_PHASE_LIMIT ((MAXPHASE / NSEC_PER_USEC) << 5) /* beyond max. dispersion */
 
-/*
- * kernel variables
- * Note: maximum error = NTP sync distance = dispersion + delay / 2;
- * estimated error = NTP dispersion.
- */
-extern unsigned long tick_usec;                /* USER_HZ period (usec) */
-
 /* Required to safely shift negative values */
 #define shift_right(x, s) ({   \
        __typeof__(x) __x = (x);        \
index c17cc9d857bc1121156371fd1d1bd53d6400debb..ed15ec993a829f6503605e9c87dbdbb407a34ad0 100644 (file)
@@ -31,7 +31,7 @@
 
 
 /* USER_HZ period (usecs): */
-unsigned long                  tick_usec = USER_TICK_USEC;
+static unsigned long           tick_usec = USER_TICK_USEC;
 
 static u64                     tick_length;
 static u64                     tick_length_base;
@@ -44,6 +44,9 @@ static u64                    tick_length_base;
 
 /*
  * phase-lock loop variables
+ *
+ * Note: maximum error = NTP sync distance = dispersion + delay / 2;
+ * estimated error = NTP dispersion.
  */
 
 /*