Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12eba147 authored by Israel Schlesinger's avatar Israel Schlesinger Committed by Matt Wagantall
Browse files

checkpatch: Add warnings for use of mdelay()



Signed-off-by: default avatarIsrael Schlesinger <israels@codeaurora.org>
(cherry picked from commit 084af58596758be6e51ef060aefa2cd622dc9205)
Signed-off-by: default avatarStepan Moskovchenko <stepanm@codeaurora.org>
parent 21f562dc
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -4616,6 +4616,12 @@ sub process {
			     "Comparing get_jiffies_64() is almost always wrong; prefer time_after64, time_before64 and friends\n" . $herecurr);
			     "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
# warn about #ifdefs in C files
#		if ($line =~ /^.\s*\#\s*if(|n)def/ && ($realfile =~ /\.c$/)) {
#		if ($line =~ /^.\s*\#\s*if(|n)def/ && ($realfile =~ /\.c$/)) {
#			print "#ifdef in C files should be avoided\n";
#			print "#ifdef in C files should be avoided\n";