mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
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:
parent
b4bea2d7a9
commit
31fbea03d9
1 changed files with 7 additions and 0 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue