[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170408160717.GA7337@alima-W65-67SF>
Date: Sat, 8 Apr 2017 17:07:17 +0100
From: Alfonso Lima <alfonsolimaastor@...il.com>
To: apw@...onical.com, joe@...ches.com
Cc: linux-kernel@...r.kernel.org
Subject: [bug report] checkpatch: if statement does not need to be enclosed
in parentheses
Hi,
In current linux-next, if you run the script on this piece of
code:
#define FOO(a) \
if (a) { \
something(); \
something_else(); \
}
You should get:
ERROR: Macros with complex values should be enclosed in parentheses
#1: FILE: foo.c:1:
+#define FOO(a) \
+ if (a) { \
+ something(); \
+ something_else(); \
+ }
We could silence checkpatch.pl using "do {} while ()" around the
if statement. However, the "if () {}" statement should be
enough. If someone could confirm this, I'll go and fix it.
Thanks,
Alfonso
Powered by blists - more mailing lists