From 461fde2fb3964797d91c67c1fbea9e28b9adf231 Mon Sep 17 00:00:00 2001 From: Patrick Pannuto Date: Mon, 9 Aug 2010 17:21:02 -0700 Subject: [PATCH] --- yaml --- r: 207340 b: refs/heads/master c: 09ef87255da0e005dd0ab39ca25714208cf29cb3 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/scripts/checkpatch.pl | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 2384bd7b6917..a671ac327461 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1a15a250862fda3fbdf8454cc7131e24de904e7c +refs/heads/master: 09ef87255da0e005dd0ab39ca25714208cf29cb3 diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index 8b69af8a76f9..dd11bbe01338 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/scripts/checkpatch.pl @@ -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 # if ($line =~ /^.\s*\#\s*if(|n)def/ && ($realfile =~ /\.c$/)) { # print "#ifdef in C files should be avoided\n";