* [PATCH v2] staging: skein: Remove all do{} while (0) loop from single statement.
@ 2015-01-11 23:41 Shirish Gajera
2015-01-12 14:15 ` Jason Cooper
2015-01-17 23:09 ` Greg KH
0 siblings, 2 replies; 4+ messages in thread
From: Shirish Gajera @ 2015-01-11 23:41 UTC (permalink / raw)
To: gregkh, eric.rost, jason, jake, antonysaraev; +Cc: devel, linux-kernel
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
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v2] staging: skein: Remove all do{} while (0) loop from single statement. 2015-01-11 23:41 [PATCH v2] staging: skein: Remove all do{} while (0) loop from single statement Shirish Gajera @ 2015-01-12 14:15 ` Jason Cooper [not found] ` <CAG77vrojhVij2154vDxCxE9vPDPfP2QuJaKFcAz4pErW_pLRVQ@mail.gmail.com> 2015-01-17 23:09 ` Greg KH 1 sibling, 1 reply; 4+ messages in thread From: Jason Cooper @ 2015-01-12 14:15 UTC (permalink / raw) To: Shirish Gajera; +Cc: gregkh, eric.rost, jake, antonysaraev, devel, linux-kernel On Sun, Jan 11, 2015 at 03:41:05PM -0800, Shirish Gajera wrote: > 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(-) Several people have submitted patches for this checkpatch warning. Please check the mailinglist archives and deconflict with the other submitters. thx, Jason. ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <CAG77vrojhVij2154vDxCxE9vPDPfP2QuJaKFcAz4pErW_pLRVQ@mail.gmail.com>]
* Re: [PATCH v2] staging: skein: Remove all do{} while (0) loop from single statement. [not found] ` <CAG77vrojhVij2154vDxCxE9vPDPfP2QuJaKFcAz4pErW_pLRVQ@mail.gmail.com> @ 2015-01-14 18:37 ` Jason Cooper 0 siblings, 0 replies; 4+ messages in thread From: Jason Cooper @ 2015-01-14 18:37 UTC (permalink / raw) To: shirish gajera; +Cc: gregkh, Eric Rost, jake, Anton Saraev, devel, linux-kernel Shirish, Please don't toppost, I've corrected it below. On Mon, Jan 12, 2015 at 11:14:57AM -0800, shirish gajera wrote: > On Mon, Jan 12, 2015 at 6:15 AM, Jason Cooper <jason@lakedaemon.net> wrote: > > On Sun, Jan 11, 2015 at 03:41:05PM -0800, Shirish Gajera wrote: > > > 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(-) > > > > Several people have submitted patches for this checkpatch warning. > > Please check the mailinglist archives and deconflict with the other > > submitters. > > It did't see any other submitter in script. > > Is there any other way to check ? The mailing list for the linux-staging tree is rather arcane to find, it's not linux-staging@... Here's the link for joining: http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel And here's the archives: http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/ hth, Jason. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] staging: skein: Remove all do{} while (0) loop from single statement. 2015-01-11 23:41 [PATCH v2] staging: skein: Remove all do{} while (0) loop from single statement Shirish Gajera 2015-01-12 14:15 ` Jason Cooper @ 2015-01-17 23:09 ` Greg KH 1 sibling, 0 replies; 4+ messages in thread From: Greg KH @ 2015-01-17 23:09 UTC (permalink / raw) To: Shirish Gajera; +Cc: eric.rost, jason, jake, antonysaraev, devel, linux-kernel On Sun, Jan 11, 2015 at 03:41:05PM -0800, Shirish Gajera wrote: > 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 Doesn't apply to my tree :( ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-01-17 23:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-11 23:41 [PATCH v2] staging: skein: Remove all do{} while (0) loop from single statement Shirish Gajera
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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox