Re: checkpatch: brackets around single statements fix

From: Joe Korty
Date: Wed May 02 2012 - 11:56:18 EST


On Wed, May 02, 2012 at 11:32:12AM -0400, Andy Whitcroft wrote:
> On Wed, May 02, 2012 at 11:10:46AM -0400, Joe Korty wrote:
> Interesting. Got an example I can use to add to the test suite.



Test case for scripts/checkpatch.pl: thinks '#else'
is the same as 'else', prints an error for brackets
around single statements.

Signed-off-by: Joe Korty <joe.korty@xxxxxxxx>

--- /tmp/y.c 2012-05-02 11:53:28.000000000 -0400
+++ /tmp/x.c 2012-05-02 11:52:28.000000000 -0400
@@ -1,6 +1,10 @@
struct abc abc = {
{ a, "a " },
{ b, "b " },
+#ifdef CONFIG_REPURPOSE
+ { d, "d " },
+#else
{ c, "c " },
+#endif
{ },
};
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/