diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 166552fd29e8..096dabbbaf6b 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -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"