diff --git a/tests/checkpatch.at b/tests/checkpatch.at index 07f4b137c35..f3b26dd341f 100755 --- a/tests/checkpatch.at +++ b/tests/checkpatch.at @@ -179,7 +179,7 @@ m4_define([COMMON_PATCH_HEADER], [dnl AT_SETUP([checkpatch - parenthesized constructs]) -for ctr in 'if' 'while' 'switch'; do +for ctr in 'if' 'while' 'switch' 'HMAP_FOR_EACH' 'BITMAP_FOR_EACH_1'; do try_checkpatch \ "COMMON_PATCH_HEADER + $ctr (first_run) { diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py index ae86937c8fd..de5061406a6 100755 --- a/utilities/checkpatch.py +++ b/utilities/checkpatch.py @@ -143,7 +143,7 @@ def reset_counters(): # something in parentheses (usually an expression) then a left curly brace. # # 'do' almost qualifies but it's also used as "do { ... } while (...);". -__parenthesized_constructs = 'if|for|while|switch|[_A-Z]+FOR_*EACH[_A-Z]*' +__parenthesized_constructs = 'if|for|while|switch|[_A-Z]+FOR_*EACH[_A-Z0-9]*' __regex_added_line = re.compile(r'^\+{1,2}[^\+][\w\W]*') __regex_subtracted_line = re.compile(r'^\-{1,2}[^\-][\w\W]*')