diff options
| author | Israel Schlesinger <israels@codeaurora.org> | 2010-07-21 13:34:18 -0700 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:51:38 -0700 |
| commit | 4269e5ecb93c44af27ef14190c5b15d0269d4774 (patch) | |
| tree | 29c264418aadb32390754ca89250fa7b67c48f8c /scripts/checkpatch.pl | |
| parent | 273eceed84588e39beca980113d91c8e3ac9ff66 (diff) | |
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>
Diffstat (limited to 'scripts/checkpatch.pl')
| -rwxr-xr-x | scripts/checkpatch.pl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index b036809e7588..72ed2387b7bd 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -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"; |
