From d2236acdd7e9976ac423b4aa9261b95621384aa7 Mon Sep 17 00:00:00 2001 From: Sarangdhar Joshi Date: Thu, 15 Oct 2015 14:21:47 -0700 Subject: [PATCH] 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 --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index cdd7402316a5..9ccdb31c8a32 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -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);