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:
parent
273eceed84
commit
4269e5ecb9
1 changed files with 6 additions and 0 deletions
|
@ -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";
|
||||
|
|
Loading…
Add table
Reference in a new issue