diff options
| author | Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de> | 2026-07-02 11:42:00 +0200 |
|---|---|---|
| committer | Thomas Gleixner <tglx@kernel.org> | 2026-07-07 23:43:44 +0200 |
| commit | a116c7582d7f7701736801a47e3432eb7cabd674 (patch) | |
| tree | 32e7305f5744fbcb626c6c2c276f7d8c822d1b34 /include/linux | |
| parent | d3dc7fabd4c4a3baaa7e7bfa84558fedad699580 (diff) | |
hrtimer: Move hrtimer_update_function() to hrtimer.c
The usage of the hrtimer base forces hrtimer.h to also expose the base
structure definitions.
Move the function to hrtimer.c to avoid this.
Signed-off-by: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260702-hrtimer-header-dependencies-v1-3-c50b19bda473@linutronix.de
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/hrtimer.h | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 7bf154cf3079..81ab9849e83b 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h @@ -287,28 +287,8 @@ static inline bool hrtimer_is_queued(struct hrtimer *timer) return READ_ONCE(timer->is_queued); } -/** - * hrtimer_update_function - Update the timer's callback function - * @timer: Timer to update - * @function: New callback function - * - * Only safe to call if the timer is not enqueued. Can be called in the callback function if the - * timer is not enqueued at the same time (see the comments above HRTIMER_STATE_ENQUEUED). - */ -static inline void hrtimer_update_function(struct hrtimer *timer, - enum hrtimer_restart (*function)(struct hrtimer *)) -{ -#ifdef CONFIG_PROVE_LOCKING - guard(raw_spinlock_irqsave)(&timer->base->cpu_base->lock); - - if (WARN_ON_ONCE(hrtimer_is_queued(timer))) - return; - - if (WARN_ON_ONCE(!function)) - return; -#endif - ACCESS_PRIVATE(timer, function) = function; -} +void hrtimer_update_function(struct hrtimer *timer, + enum hrtimer_restart (*function)(struct hrtimer *)); /* Forward a hrtimer so it expires after now: */ extern u64 |
