|
@@ -3912,10 +3912,15 @@ sub process {
|
|
|
|
|
|
# prefer usleep_range over udelay
|
|
|
if ($line =~ /\budelay\s*\(\s*(\d+)\s*\)/) {
|
|
|
+ my $delay = $1;
|
|
|
# ignore udelay's < 10, however
|
|
|
- if (! ($1 < 10) ) {
|
|
|
+ if (! ($delay < 10) ) {
|
|
|
CHK("USLEEP_RANGE",
|
|
|
- "usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt\n" . $line);
|
|
|
+ "usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt\n" . $herecurr);
|
|
|
+ }
|
|
|
+ if ($delay > 2000) {
|
|
|
+ WARN("LONG_UDELAY",
|
|
|
+ "long udelay - prefer mdelay; see arch/arm/include/asm/delay.h\n" . $herecurr);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -3923,7 +3928,7 @@ sub process {
|
|
|
if ($line =~ /\bmsleep\s*\((\d+)\);/) {
|
|
|
if ($1 < 20) {
|
|
|
WARN("MSLEEP",
|
|
|
- "msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt\n" . $line);
|
|
|
+ "msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt\n" . $herecurr);
|
|
|
}
|
|
|
}
|
|
|
|