[PATCH 3/4] timekeeping: Remove tk_is_aux() and its usage
From: Thomas Weißschuh (Schneider Electric)
Date: Wed Aug 12 2026 - 11:18:24 EST
Any timekeeper which is not the core timekeeper is already known to be
an auxiliary one. There is no need for an additional conditional.
Remove the 'else if' and the now unused tk_is_aux().
Signed-off-by: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@xxxxxxxxxxxxx>
---
kernel/time/timekeeping.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 12bd61e9b5de..5cdf6795c5a6 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -62,22 +62,12 @@ static inline bool tk_get_aux_ts64(unsigned int tkid, struct timespec64 *ts)
{
return ktime_get_aux_ts64(CLOCK_AUX + tkid - TIMEKEEPER_AUX_FIRST, ts);
}
-
-static inline bool tk_is_aux(const struct timekeeper *tk)
-{
- return tk->id >= TIMEKEEPER_AUX_FIRST && tk->id <= TIMEKEEPER_AUX_LAST;
-}
static inline struct tk_data *aux_get_tk_data(clockid_t id);
#else
static inline bool tk_get_aux_ts64(unsigned int tkid, struct timespec64 *ts)
{
return false;
}
-
-static inline bool tk_is_aux(const struct timekeeper *tk)
-{
- return false;
-}
static inline struct tk_data *aux_get_tk_data(clockid_t id)
{
return NULL;
@@ -849,7 +839,7 @@ static void timekeeping_update_from_shadow(struct tk_data *tkd, unsigned int act
update_fast_timekeeper(&tk->tkr_mono, &tk_fast_mono);
update_fast_timekeeper(&tk->tkr_raw, &tk_fast_raw);
- } else if (tk_is_aux(tk)) {
+ } else {
vdso_time_update_aux(tk);
}
--
2.55.0