diff --git a/[refs] b/[refs] index acc14f5afd53..2384bd7b6917 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8bbea968f9022c3f66a36902509574597611be99 +refs/heads/master: 1a15a250862fda3fbdf8454cc7131e24de904e7c diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index 2018f4349b47..8b69af8a76f9 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/scripts/checkpatch.pl @@ -2584,6 +2584,14 @@ sub process { } } +# prefer usleep_range over udelay + if ($line =~ /\budelay\s*\(\s*(\w+)\s*\)/) { + # ignore udelay's < 10, however + if (! (($1 =~ /(\d+)/) && ($1 < 10)) ) { + CHK("usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt\n" . $line); + } + } + # warn about #ifdefs in C files # if ($line =~ /^.\s*\#\s*if(|n)def/ && ($realfile =~ /\.c$/)) { # print "#ifdef in C files should be avoided\n";