checkpatch: reject unrelaxed readl/writel.

Change-Id: I9490245ba24df51f1b4a69e2bb46b27da13a333a
Signed-off-by: Gregory Bean <gbean@codeaurora.org>
(cherry picked from commit 66b2a3733e7219e5291c633eb5778bec6500b74d)
This commit is contained in:
Gregory Bean 2011-03-17 11:17:59 -07:00 committed by Stephen Boyd
parent b4bea2d7a9
commit 31fbea03d9

View file

@ -3219,6 +3219,13 @@ sub process {
"Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt\n" . $herecurr);
}
# readl & writel are unsafe, use the _relaxed variants
if ($line =~ /\b((?:read|write)l)\b/) {
ERROR("Use of $1 is deprecated: use $1_relaxed\n\t" .
"with appropriate memory barriers instead.\n" .
$herecurr);
}
# warn about #if 0
if ($line =~ /^.\s*\#\s*if\s+0\b/) {
WARN("if this code is redundant consider removing it\n"