From mboxrd@z Thu Jan 1 00:00:00 1970 From: michi1@michaelblizek.twilightparadox.com (michi1 at michaelblizek.twilightparadox.com) Date: Fri, 9 Jan 2015 17:55:53 +0100 Subject: Submitted a first patch and no reply In-Reply-To: References: Message-ID: <20150109165552.GA4687@grml> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi! On 12:00 Thu 08 Jan , shirish gajera wrote: > This patch fixes the checkpatch.pl warning: > > WARNING: Single statement macros should not use a do {} while (0) loop > > I have added single statement in curly braces, because it was giving > me "WARNING: macros should not use a trailing semicolon". ... > -#define R256(p0, p1, p2, p3, ROT, r_num) \ > -do { \ > - ROUND256(p0, p1, p2, p3, ROT, r_num); \ > -} while (0) > +#define R256(p0, p1, p2, p3, ROT, r_num) \ > +{ \ > + ROUND256(p0, p1, p2, p3, ROT, r_num); \ > +} This is wrong. Take a look at the reason of the do...while: http://gcc.gnu.org/onlinedocs/cpp/Swallowing-the-Semicolon.html You probably want to replace it with something like this: #define R256(p0, p1, p2, p3, ROT, r_num) ROUND256(p0, p1, p2, p3, ROT, r_num) or maybe even convert it to an inline function. -Michi -- programing a layer 3+4 network protocol for mesh networks see http://michaelblizek.twilightparadox.com