aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 2018f4349b47..8b69af8a76f9 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2584,6 +2584,14 @@ sub process {
2584 } 2584 }
2585 } 2585 }
2586 2586
2587# prefer usleep_range over udelay
2588 if ($line =~ /\budelay\s*\(\s*(\w+)\s*\)/) {
2589 # ignore udelay's < 10, however
2590 if (! (($1 =~ /(\d+)/) && ($1 < 10)) ) {
2591 CHK("usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt\n" . $line);
2592 }
2593 }
2594
2587# warn about #ifdefs in C files 2595# warn about #ifdefs in C files
2588# if ($line =~ /^.\s*\#\s*if(|n)def/ && ($realfile =~ /\.c$/)) { 2596# if ($line =~ /^.\s*\#\s*if(|n)def/ && ($realfile =~ /\.c$/)) {
2589# print "#ifdef in C files should be avoided\n"; 2597# print "#ifdef in C files should be avoided\n";