[PATCH 1/4] timekeeping: Move timekeeper_is_core_tk() up in the file
Thomas Weißschuh (Schneider Electric) <[email protected]>
| Newsgroups | org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <20260812-timekeeping-conditionals-v1-1-75ebe366677d@linutronix.de> |
New users are about to be introduced which require the definition earlier in the file. Move it. Signed-off-by: Thomas Weißschuh (Schneider Electric) <[email protected]> --- kernel/time/timekeeping.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index ea2e6e55f37b..2249d7fb3cb6 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -90,6 +90,11 @@ static inline void tk_update_aux_offs(struct timekeeper *tk, ktime_t offs) tk->monotonic_to_aux = ktime_to_timespec64(offs); } +static inline bool timekeeper_is_core_tk(struct timekeeper *tk) +{ + return !IS_ENABLED(CONFIG_POSIX_AUX_CLOCKS) || tk->id == TIMEKEEPER_CORE; +} + /* flag for if timekeeping is suspended */ int __read_mostly timekeeping_suspended; @@ -1735,11 +1740,6 @@ int do_settimeofday64(const struct timespec64 *ts) } EXPORT_SYMBOL(do_settimeofday64); -static inline bool timekeeper_is_core_tk(struct timekeeper *tk) -{ - return !IS_ENABLED(CONFIG_POSIX_AUX_CLOCKS) || tk->id == TIMEKEEPER_CORE; -} - /** * __timekeeping_inject_offset - Adds or subtracts from the current time. * @tkd: Pointer to the timekeeper to modify -- 2.55.0