* [PATCH] kernel.h: fix kernel-doc for might_sleep
@ 2008-08-17 22:50 Randy Dunlap
0 siblings, 0 replies; only message in thread
From: Randy Dunlap @ 2008-08-17 22:50 UTC (permalink / raw)
To: lkml; +Cc: akpm, Uwe Kleine-König
From: Randy Dunlap <randy.dunlap@oracle.com>
Put the kernel-doc for might_sleep() _immediately_ before the macro
(no intervening lines). Otherwise kernel-doc complains like so:
Warning(linux-2.6.27-rc3-git2//include/linux/kernel.h:129): No description found for parameter 'file'
Warning(linux-2.6.27-rc3-git2//include/linux/kernel.h:129): No description found for parameter 'line'
because kernel-doc is looking at the wrong function prototype
(i.e., __might_sleep). [Yes, I have a todo note to myself to
check/warn for that inconsistency in scripts/kernel-doc.]
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
cc: Uwe Kleine-K_nig <Uwe.Kleine-Koenig@digi.com>
---
include/linux/kernel.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- linux-2.6.27-rc3-git4.orig/include/linux/kernel.h
+++ linux-2.6.27-rc3-git4/include/linux/kernel.h
@@ -115,6 +115,8 @@ extern int _cond_resched(void);
# define might_resched() do { } while (0)
#endif
+#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
+ void __might_sleep(char *file, int line);
/**
* might_sleep - annotation for functions that can sleep
*
@@ -125,8 +127,6 @@ extern int _cond_resched(void);
* be bitten later when the calling function happens to sleep when it is not
* supposed to.
*/
-#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
- void __might_sleep(char *file, int line);
# define might_sleep() \
do { __might_sleep(__FILE__, __LINE__); might_resched(); } while (0)
#else
---
~Randy
Linux Plumbers Conference, 17-19 September 2008, Portland, Oregon USA
http://linuxplumbersconf.org/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-08-17 22:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-17 22:50 [PATCH] kernel.h: fix kernel-doc for might_sleep Randy Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).