Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240123164702.55612-3-anna-maria@linutronix.de

authored by

Anna-Maria Behnsen and committed by
Thomas Gleixner
ca2768bb 1a4729ec

+13 -19
+3 -11
include/linux/hrtimer.h
··· 342 342 hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval); 343 343 344 344 /** 345 - * hrtimer_forward_now - forward the timer expiry so it expires after now 345 + * hrtimer_forward_now() - forward the timer expiry so it expires after now 346 346 * @timer: hrtimer to forward 347 347 * @interval: the interval to forward 348 348 * 349 - * Forward the timer expiry so it will expire after the current time 350 - * of the hrtimer clock base. Returns the number of overruns. 351 - * 352 - * Can be safely called from the callback function of @timer. If 353 - * called from other contexts @timer must neither be enqueued nor 354 - * running the callback and the caller needs to take care of 355 - * serialization. 356 - * 357 - * Note: This only updates the timer expiry value and does not requeue 358 - * the timer. 349 + * It is a variant of hrtimer_forward(). The timer will expire after the current 350 + * time of the hrtimer clock base. See hrtimer_forward() for details. 359 351 */ 360 352 static inline u64 hrtimer_forward_now(struct hrtimer *timer, 361 353 ktime_t interval)
+10 -8
kernel/time/hrtimer.c
··· 1021 1021 } 1022 1022 1023 1023 /** 1024 - * hrtimer_forward - forward the timer expiry 1024 + * hrtimer_forward() - forward the timer expiry 1025 1025 * @timer: hrtimer to forward 1026 1026 * @now: forward past this time 1027 1027 * @interval: the interval to forward 1028 1028 * 1029 1029 * Forward the timer expiry so it will expire in the future. 1030 - * Returns the number of overruns. 1031 1030 * 1032 - * Can be safely called from the callback function of @timer. If 1033 - * called from other contexts @timer must neither be enqueued nor 1034 - * running the callback and the caller needs to take care of 1035 - * serialization. 1031 + * .. note:: 1032 + * This only updates the timer expiry value and does not requeue the timer. 1036 1033 * 1037 - * Note: This only updates the timer expiry value and does not requeue 1038 - * the timer. 1034 + * There is also a variant of the function hrtimer_forward_now(). 1035 + * 1036 + * Context: Can be safely called from the callback function of @timer. If called 1037 + * from other contexts @timer must neither be enqueued nor running the 1038 + * callback and the caller needs to take care of serialization. 1039 + * 1040 + * Return: The number of overruns are returned. 1039 1041 */ 1040 1042 u64 hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval) 1041 1043 {