From: Shirish Gajera <gajerashirish@gmail.com>
To: gregkh@linuxfoundation.org, eric.rost@mybabylon.net,
jason@lakedaemon.net, jake@lwn.net, antonysaraev@gmail.com
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2] staging: skein: Remove all do{} while (0) loop from single statement.
Date: Sun, 11 Jan 2015 15:41:05 -0800 [thread overview]
Message-ID: <20150111234105.GA2744@shirish-ThinkPad-Edge-E430> (raw)
This patch fixes the checkpatch.pl warning:
WARNING: Single statement macros should not use a do {} while (0) loop
I remove do while from the single statement macro.
Signed-off-by: Shirish Gajera <gajerashirish@gmail.com>
---
drivers/staging/skein/skein_block.c | 31 +++++++++----------------------
1 file changed, 9 insertions(+), 22 deletions(-)
diff --git a/drivers/staging/skein/skein_block.c b/drivers/staging/skein/skein_block.c
index 66261ab..f89b410 100644
--- a/drivers/staging/skein/skein_block.c
+++ b/drivers/staging/skein/skein_block.c
@@ -67,10 +67,8 @@ do { \
} while (0)
#if SKEIN_UNROLL_256 == 0
-#define R256(p0, p1, p2, p3, ROT, r_num) /* fully unrolled */ \
-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)
#define I256(R) \
do { \
@@ -82,10 +80,7 @@ do { \
} while (0)
#else
/* looping version */
-#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)
#define I256(R) \
do { \
@@ -154,10 +149,8 @@ do { \
} while (0)
#if SKEIN_UNROLL_512 == 0
-#define R512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, r_num) /* unrolled */ \
-do { \
- ROUND512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, r_num); \
-} while (0)
+#define R512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, r_num) \
+ ROUND512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, r_num)
#define I512(R) \
do { \
@@ -173,10 +166,8 @@ do { \
} while (0)
#else /* looping version */
-#define R512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, r_num) \
-do { \
- ROUND512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, r_num); \
-} while (0)
+#define R512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, r_num) \
+ ROUND512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, r_num)
#define I512(R) \
do { \
@@ -263,10 +254,8 @@ do { \
#if SKEIN_UNROLL_1024 == 0
#define R1024(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, pA, pB, pC, pD, pE, pF, \
ROT, rn) \
-do { \
ROUND1024(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, pA, pB, pC, pD, pE, \
- pF, ROT, rn); \
-} while (0)
+ pF, ROT, rn)
#define I1024(R) \
do { \
@@ -291,10 +280,8 @@ do { \
#else /* looping version */
#define R1024(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, pA, pB, pC, pD, pE, pF, \
ROT, rn) \
-do { \
ROUND1024(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, pA, pB, pC, pD, pE, \
- pF, ROT, rn); \
-} while (0)
+ pF, ROT, rn)
#define I1024(R) \
do { \
--
1.9.1
next reply other threads:[~2015-01-11 23:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-11 23:41 Shirish Gajera [this message]
2015-01-12 14:15 ` Jason Cooper
[not found] ` <CAG77vrojhVij2154vDxCxE9vPDPfP2QuJaKFcAz4pErW_pLRVQ@mail.gmail.com>
2015-01-14 18:37 ` Jason Cooper
2015-01-17 23:09 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150111234105.GA2744@shirish-ThinkPad-Edge-E430 \
--to=gajerashirish@gmail.com \
--cc=antonysaraev@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=eric.rost@mybabylon.net \
--cc=gregkh@linuxfoundation.org \
--cc=jake@lwn.net \
--cc=jason@lakedaemon.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®