Commit 2c92488a authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds
Browse files

checkpatch: warn on use of yield()

Using yield() is generally wrong.  Warn on its use.
Signed-off-by: default avatarJoe Perches <>
Cc: Andy Whitcroft <>
Cc: Peter Zijlstra <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent aad4f614
......@@ -3338,6 +3338,12 @@ sub process {
"__func__ should be used instead of gcc specific __FUNCTION__\n" . $herecurr);
# check for use of yield()
if ($line =~ /\byield\s*\(\s*\)/) {
"Using yield() is generally wrong. See yield() kernel-doc (sched/core.c)\n" . $herecurr);
# check for semaphores initialized locked
if ($line =~ /^.\s*sema_init.+,\W?0\W?\)/) {
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