summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRohit Vaswani <rvaswani@codeaurora.org>2011-12-06 20:03:07 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:51:47 -0700
commit1660c32b1a5c09bbcb0b7367424175d617162336 (patch)
tree4a9df067749671b9bc1f3986dffaf2e6b8904f3c /scripts
parent994349a24e307527a1dc25672bd230d45d416927 (diff)
checkpatch: Add check for gpiomux usage in msm board files
MSM has a board-*-gpiomux file where all the gpiomux configs reside. Warn if a non gpiomux board file tries to add gpiomux configs. The camera board file is an exception to this rule. Change-Id: Ibab190dcbd7ea78e7ca150142c68c5ae881e4e06 Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org> (cherry picked from commit 60d78bb9809e7d4d1c3dc1425cbfd9e649e87c1c) Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 93c862155690..972fcf99804b 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -4970,6 +4970,14 @@ sub process {
$herecurr);
}
+# MSM - check if a non board-gpiomux file has any gpiomux declarations
+ if ($realfile =~ /\/mach-msm\/board-[0-9]+/ &&
+ $realfile !~ /camera/ && $realfile !~ /gpiomux/ &&
+ $line =~ /\s*struct msm_gpiomux_config\s*/ ) {
+ WARN("GPIOMUX_IN_BOARD",
+ "Non gpiomux board file cannot have a gpiomux config declarations. Please declare gpiomux configs in board-*-gpiomux.c file.\n" . $herecurr);
+ }
+
# unbounded string functions are overflow risks
my %str_fns = (
"sprintf" => "snprintf",