checkpatch: Add warnings for use of mdelay()

Signed-off-by: Israel Schlesinger <israels@codeaurora.org>
(cherry picked from commit 084af58596758be6e51ef060aefa2cd622dc9205)
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
This commit is contained in:
Israel Schlesinger 2010-07-21 13:34:18 -07:00 committed by David Keitel
parent 273eceed84
commit 4269e5ecb9

View file

@ -5096,6 +5096,12 @@ sub process {
"Comparing get_jiffies_64() is almost always wrong; prefer time_after64, time_before64 and friends\n" . $herecurr);
}
# check the patch for use of mdelay
if ($line =~ /\bmdelay\s*\(/) {
WARN("MDELAY",
"use of mdelay() found: msleep() is the preferred API.\n" . $herecurr );
}
# warn about #ifdefs in C files
# if ($line =~ /^.\s*\#\s*if(|n)def/ && ($realfile =~ /\.c$/)) {
# print "#ifdef in C files should be avoided\n";