[PATCH 1/2] timekeeping: Drop the clockid_is_aux_clock() check in aux_get_res()

From: Thomas Weißschuh (Schneider Electric)

Date: Thu Dec 03 2026 - 10:16:55 EST


This function can only ever be called for an auxiliary clock.
The additional check is dead code. The original intention was probably
to check for a disabled auxiliary clock. Changing this now would break
the ABI however.

Remove the pointless check.

Signed-off-by: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@xxxxxxxxxxxxx>
---
kernel/time/timekeeping.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 4f11708e44c7..c3a87e434718 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -3215,9 +3215,6 @@ EXPORT_SYMBOL_GPL(ktime_get_aux_ts64);

static int aux_get_res(clockid_t id, struct timespec64 *tp)
{
- if (!clockid_is_aux_clock(id))
- return -ENODEV;
-
tp->tv_sec = aux_clock_resolution_ns() / NSEC_PER_SEC;
tp->tv_nsec = aux_clock_resolution_ns() % NSEC_PER_SEC;
return 0;

--
2.56.1