* [PATCH] checkpatch: don't warn for space after for_each_* macros
@ 2010-05-31 15:03 Andi Kleen
0 siblings, 0 replies; only message in thread
From: Andi Kleen @ 2010-05-31 15:03 UTC (permalink / raw)
To: apw, linux-kernel
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 checkpatch.pl 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@linux.intel.com>
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index bd88f11..c35eda2 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1906,6 +1906,7 @@ sub process {
if|for|while|switch|return|case|
volatile|__volatile__|
__attribute__|format|__extension__|
+ ([a-z]+_)?for_each_[a-z_]+|
asm|__asm__)$/x)
{
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-05-31 15:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-31 15:03 [PATCH] checkpatch: don't warn for space after for_each_* macros Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome