aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Uvarov <maxim.uvarov@linaro.org>2018-01-18 19:03:20 +0300
committerMaxim Uvarov <maxim.uvarov@linaro.org>2018-01-18 22:19:40 +0300
commitccb6eb85729ad0657b5c852cb2a6ddb519d60898 (patch)
treee2cd636f6105498e6b5f2ba0a4fc728c478fafe2
parentf3b6be23045a924b8d8034a9a490b4fe5928684e (diff)
checkpatch.pl: do not warn on odp aligh macros
do not if structure has ODP_ preprocessor macro. ERROR: open brace '{' following function declarations go on the next line static uint8_t ODP_ALIGNED(4) ip_hdr_test_vect[NUM_IP_HDR][IP_HDR_LEN] = { Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
-rwxr-xr-xscripts/checkpatch.pl1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 16316b928..d366f257d 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3411,6 +3411,7 @@ sub process {
# function brace can't be on same line, except for #defines of do while,
# or if closed on same line
if (($line=~/$Type\s*$Ident\(.*\).*\s*{/) and
+ !($line=~/ODP_/) and
!($line=~/\#\s*define.*do\s\{/) and !($line=~/}/)) {
if (ERROR("OPEN_BRACE",
"open brace '{' following function declarations go on the next line\n" . $herecurr) &&