[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20100531150332.GA18341@basil.fritz.box>
Date: Mon, 31 May 2010 17:03:32 +0200
From: Andi Kleen <andi@...stfloor.org>
To: apw@...onical.com, linux-kernel@...r.kernel.org
Subject: [PATCH] checkpatch: don't warn for space after for_each_* macros
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@...ux.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)
{
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists