Commit 7106a27b authored by Randy Dunlap's avatar Randy Dunlap Committed by Linus Torvalds

kernel.h: fix might_sleep kernel-doc

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: default avatarRandy Dunlap <randy.dunlap@oracle.com>
Cc: <Uwe.Kleine-Koenig@digi.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 89a056df
...@@ -116,6 +116,8 @@ extern int _cond_resched(void); ...@@ -116,6 +116,8 @@ extern int _cond_resched(void);
# define might_resched() do { } while (0) # define might_resched() do { } while (0)
#endif #endif
#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
void __might_sleep(char *file, int line);
/** /**
* might_sleep - annotation for functions that can sleep * might_sleep - annotation for functions that can sleep
* *
...@@ -126,8 +128,6 @@ extern int _cond_resched(void); ...@@ -126,8 +128,6 @@ extern int _cond_resched(void);
* be bitten later when the calling function happens to sleep when it is not * be bitten later when the calling function happens to sleep when it is not
* supposed to. * supposed to.
*/ */
#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
void __might_sleep(char *file, int line);
# define might_sleep() \ # define might_sleep() \
do { __might_sleep(__FILE__, __LINE__); might_resched(); } while (0) do { __might_sleep(__FILE__, __LINE__); might_resched(); } while (0)
#else #else
......
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