Skip to content

Commit b87752e

Browse files
rddunlapIngo Molnar
authored andcommitted
timers: Fix kernel-doc format and add Return values
Fix kernel-doc format and warnings: timer.h:26: warning: Cannot understand * @TIMER_DEFERRABLE: A deferrable timer will work normally when the on line 26 - I thought it was a doc line timer.h:146: warning: No description found for return value of 'timer_pending' timer.h:180: warning: No description found for return value of 'del_timer_sync' timer.h:193: warning: No description found for return value of 'del_timer' Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 76f788e commit b87752e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

include/linux/timer.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#define __TIMER_LOCKDEP_MAP_INITIALIZER(_kn)
2323
#endif
2424

25-
/**
25+
/*
2626
* @TIMER_DEFERRABLE: A deferrable timer will work normally when the
2727
* system is busy, but will not cause a CPU to come out of idle just
2828
* to service it; instead, the timer will be serviced when the CPU
@@ -140,7 +140,7 @@ static inline void destroy_timer_on_stack(struct timer_list *timer) { }
140140
* or not. Callers must ensure serialization wrt. other operations done
141141
* to this timer, eg. interrupt contexts, or other CPUs on SMP.
142142
*
143-
* return value: 1 if the timer is pending, 0 if not.
143+
* Returns: 1 if the timer is pending, 0 if not.
144144
*/
145145
static inline int timer_pending(const struct timer_list * timer)
146146
{
@@ -175,6 +175,10 @@ extern int timer_shutdown(struct timer_list *timer);
175175
* See timer_delete_sync() for detailed explanation.
176176
*
177177
* Do not use in new code. Use timer_delete_sync() instead.
178+
*
179+
* Returns:
180+
* * %0 - The timer was not pending
181+
* * %1 - The timer was pending and deactivated
178182
*/
179183
static inline int del_timer_sync(struct timer_list *timer)
180184
{
@@ -188,6 +192,10 @@ static inline int del_timer_sync(struct timer_list *timer)
188192
* See timer_delete() for detailed explanation.
189193
*
190194
* Do not use in new code. Use timer_delete() instead.
195+
*
196+
* Returns:
197+
* * %0 - The timer was not pending
198+
* * %1 - The timer was pending and deactivated
191199
*/
192200
static inline int del_timer(struct timer_list *timer)
193201
{

0 commit comments

Comments
 (0)