laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/37904?usp=email )

Change subject: Revert "checkpatch: recognize json_array_foreach etc."
......................................................................

Revert "checkpatch: recognize json_array_foreach etc."

Turns out we don't want to treat loop macros the same as real for/while
etc. regarding spaces.

Harald wrote:
> Those macros are used without space before the open parenthesis, for
> decades in the kernel and also in osmocom

This reverts commit afd9d56e0568a61d0b2de010f710baffb71bff25.

Related: 
https://gerrit.osmocom.org/c/osmo-sgsn/+/37864/comment/7eada1b7_0e584088/
Change-Id: I59d4a89cca516df8346fc090f532d42fc9d6acac
---
M lint/checkpatch/checkpatch.pl
1 file changed, 1 insertion(+), 2 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified




diff --git a/lint/checkpatch/checkpatch.pl b/lint/checkpatch/checkpatch.pl
index ff6eea1..eada2a9 100755
--- a/lint/checkpatch/checkpatch.pl
+++ b/lint/checkpatch/checkpatch.pl
@@ -4888,7 +4888,6 @@
                        # Ignore those directives where spaces _are_ permitted.
                        if ($name =~ /^(?:
                                if|for|while|switch|return|case|
-                               [a-z_]*for[_]?each[a-z_]*|
                                volatile|__volatile__|
                                __attribute__|format|__extension__|
                                asm|__asm__)$/x)
@@ -5514,7 +5513,7 @@
                }

 # Need a space before open parenthesis after if, while etc
-               if ($line =~ 
/\b(if|while|for|switch|[a-z_]*for[_]?each[a-z_]*)\(/) {
+               if ($line =~ /\b(if|while|for|switch)\(/) {
                        if (ERROR("SPACING",
                                  "space required before the open parenthesis 
'('\n" . $herecurr) &&
                            $fix) {

--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/37904?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I59d4a89cca516df8346fc090f532d42fc9d6acac
Gerrit-Change-Number: 37904
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>

Reply via email to