From: Maxim Uvarov <maxim.uva...@linaro.org>

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.uva...@linaro.org>
---
/** Email created from pull request 398 (apalos:align)
 ** https://github.com/Linaro/odp/pull/398
 ** Patch: https://github.com/Linaro/odp/pull/398.patch
 ** Base sha: 77ff03881d844a9d6a4bc773086bd8aaecace541
 ** Merge commit sha: c603837c88f6623aeccb807bbb19cbd91c4c0583
 **/
 scripts/checkpatch.pl | 1 +
 1 file changed, 1 insertion(+)

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) &&

Reply via email to