[PATCH 02/21] ntp: Make tick_usec static
From: Anna-Maria Behnsen
Date: Wed Sep 11 2024 - 09:18:19 EST
From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
There are no users of tick_usec outside of the NTP core code. Therefore
make tick_usec static.
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Signed-off-by: Anna-Maria Behnsen <anna-maria@xxxxxxxxxxxxx>
---
include/linux/timex.h | 7 -------
kernel/time/ntp.c | 5 ++++-
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/include/linux/timex.h b/include/linux/timex.h
index 7f7a12fd8200..4ee32eff3f22 100644
--- a/include/linux/timex.h
+++ b/include/linux/timex.h
@@ -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); \
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index 0dba1179d81d..8e68a85996f7 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -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.
*/
/*
--
2.39.2