Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
checkpatch: Add warnings for use of mdelay()
Browse files Browse the repository at this point in the history
Signed-off-by: Israel Schlesinger <israels@codeaurora.org>
(cherry picked from commit 084af58596758be6e51ef060aefa2cd622dc9205)
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
  • Loading branch information
Israel Schlesinger authored and Stepan Moskovchenko committed Oct 10, 2014
1 parent 1404425 commit 2e13160
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -4003,6 +4003,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";
Expand Down

0 comments on commit 2e13160

Please sign in to comment.