checkpatch: Add exceptions for "dsb" keyword usage

Currently checkpatch.pl throws error for any use of "dsb"
keyword.  Add exceptions when it is used in a variable or a
function name.  Expectations are when 'dsb' keyword is used in a
variable or a function name, it is prefixed with class [-_>*\.]
and/or suffixed with class [-_\.;].

Change-Id: I06cd21e42135334bb41cf31f13088b118fcf3ac9
Signed-off-by: Sarangdhar Joshi <spjoshi@codeaurora.org>
This commit is contained in:
Sarangdhar Joshi 2015-10-15 14:21:47 -07:00 • committed by Raghavendra Rao Ananta
commit d2236acdd7

View file

@ -5576,7 +5576,7 @@ sub process {
}
# dsb is too ARMish, and should usually be mb.
if ($line =~ /\bdsb\b/) {
if ($line =~ /[^-_>*\.]\bdsb\b[^-_\.;]/) {
WARN("ARM_BARRIER",
"Use of dsb is discouranged: prefer mb.\n" .
$herecurr);