checkpatch: warn on use of yield()
[linux-flexiantxendom0-3.2.10.git] / scripts / checkpatch.pl
index 21486c0..d1fd466 100755 (executable)
@@ -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*\)/) {
+                       WARN("YIELD",
+                            "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?\)/) {
                        WARN("CONSIDER_COMPLETION",