|
@@ -2592,6 +2592,13 @@ sub process {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+# warn about unexpectedly long msleep's
|
|
|
|
+ if ($line =~ /\bmsleep\s*\((\d+)\);/) {
|
|
|
|
+ if ($1 < 20) {
|
|
|
|
+ WARN("msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt\n" . $line);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
# warn about #ifdefs in C files
|
|
# warn about #ifdefs in C files
|
|
# if ($line =~ /^.\s*\#\s*if(|n)def/ && ($realfile =~ /\.c$/)) {
|
|
# if ($line =~ /^.\s*\#\s*if(|n)def/ && ($realfile =~ /\.c$/)) {
|
|
# print "#ifdef in C files should be avoided\n";
|
|
# print "#ifdef in C files should be avoided\n";
|