summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMatt Wagantall <mattw@codeaurora.org>2010-06-03 12:28:18 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:51:37 -0700
commit273eceed84588e39beca980113d91c8e3ac9ff66 (patch)
tree27225d09962dd66f04d41a876816577d4742f190 /scripts
parent5867d1e2ad36928eba642ac1c7c695cbc13ef9cc (diff)
checkpatch: Exceptions for CLK_* macros and some spaces in macros
Add CLK_* macros used in MSM clock drivers to the list of exceptions for the "Macros with complex values should be enclosed in parenthesis" test. Also, allow spaces following open branckets for macros where the macro is the first token on the line, the space preceds a decimal number, and the line ends with ")," or ")". Such arrangements can be useful for aligning numerical columns of tables when the rows are described by macros. Change-Id: I7701119ada2ea8fd646e5448eae51786bbf1e8fa Signed-off-by: Matt Wagantall <mattw@codeaurora.org> (cherry picked from commit ed6d6ed1c6b8f6016ea5676d075331e31b7ac1f8) Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 1486354b13fa..b036809e7588 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -4134,7 +4134,7 @@ sub process {
# check spacing on parentheses
if ($line =~ /\(\s/ && $line !~ /\(\s*(?:\\)?$/ &&
- $line !~ /for\s*\(\s+;/) {
+ $line !~ /for\s*\(\s+;/ && $line !~ /^\+\s*[A-Z_][A-Z\d_]*\(\s*\d+(\,.*)?\)\,?$/) {
if (ERROR("SPACING",
"space prohibited after that open parenthesis '('\n" . $herecurr) &&
$fix) {
@@ -4544,6 +4544,7 @@ sub process {
MODULE_PARM_DESC|
DECLARE_PER_CPU|
DEFINE_PER_CPU|
+ CLK_[A-Z\d_]+|
__typeof__\(|
union|
struct|