Commit ca2768bb authored by Anna-Maria Behnsen's avatar Anna-Maria Behnsen Committed by Thomas Gleixner

hrtimers: Update formatting of documentation

Documentation of functions lacks the annotations which are used by
kernel-doc and *.rst to make appearance in rendered documents more
user-friendly.

Use those annotations to improve user-friendliness. While at it prevent
duplication of comments and use a reference instead.
Signed-off-by: default avatarAnna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240123164702.55612-3-anna-maria@linutronix.de
parent 1a4729ec
...@@ -342,20 +342,12 @@ extern u64 ...@@ -342,20 +342,12 @@ extern u64
hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval); hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval);
/** /**
* hrtimer_forward_now - forward the timer expiry so it expires after now * hrtimer_forward_now() - forward the timer expiry so it expires after now
* @timer: hrtimer to forward * @timer: hrtimer to forward
* @interval: the interval to forward * @interval: the interval to forward
* *
* Forward the timer expiry so it will expire after the current time * It is a variant of hrtimer_forward(). The timer will expire after the current
* of the hrtimer clock base. Returns the number of overruns. * time of the hrtimer clock base. See hrtimer_forward() for details.
*
* Can be safely called from the callback function of @timer. If
* called from other contexts @timer must neither be enqueued nor
* running the callback and the caller needs to take care of
* serialization.
*
* Note: This only updates the timer expiry value and does not requeue
* the timer.
*/ */
static inline u64 hrtimer_forward_now(struct hrtimer *timer, static inline u64 hrtimer_forward_now(struct hrtimer *timer,
ktime_t interval) ktime_t interval)
......
...@@ -1021,21 +1021,23 @@ void unlock_hrtimer_base(const struct hrtimer *timer, unsigned long *flags) ...@@ -1021,21 +1021,23 @@ void unlock_hrtimer_base(const struct hrtimer *timer, unsigned long *flags)
} }
/** /**
* hrtimer_forward - forward the timer expiry * hrtimer_forward() - forward the timer expiry
* @timer: hrtimer to forward * @timer: hrtimer to forward
* @now: forward past this time * @now: forward past this time
* @interval: the interval to forward * @interval: the interval to forward
* *
* Forward the timer expiry so it will expire in the future. * Forward the timer expiry so it will expire in the future.
* Returns the number of overruns.
* *
* Can be safely called from the callback function of @timer. If * .. note::
* called from other contexts @timer must neither be enqueued nor * This only updates the timer expiry value and does not requeue the timer.
* running the callback and the caller needs to take care of
* serialization.
* *
* Note: This only updates the timer expiry value and does not requeue * There is also a variant of the function hrtimer_forward_now().
* the timer. *
* Context: Can be safely called from the callback function of @timer. If called
* from other contexts @timer must neither be enqueued nor running the
* callback and the caller needs to take care of serialization.
*
* Return: The number of overruns are returned.
*/ */
u64 hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval) u64 hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment