From: Andi Kleen on
checkpatch: don't warn for space after for_each_* macros

for_each_possible_cpu and similar macros act like loops and it's natural
for them to be written like while () with a space before the paren.

Unfortunately warns about this:

WARNING: space prohibited between function name and open parenthesis '('
+ for_each_possible_cpu (cpu) {

Don't warn for all function names matching a reasonable for_each pattern.

Signed-off-by: Andi Kleen <ak(a)>

diff --git a/scripts/ b/scripts/
index bd88f11..c35eda2 100755
--- a/scripts/
+++ b/scripts/
@@ -1906,6 +1906,7 @@ sub process {
+ ([a-z]+_)?for_each_[a-z_]+|

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)
More majordomo info at
Please read the FAQ at