linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: skein: Fix checkpatch warnings
@ 2015-01-10 15:00 Arno Tiemersma
  2015-01-12 14:14 ` Jason Cooper
  2015-01-17 23:09 ` Greg KH
  0 siblings, 2 replies; 7+ messages in thread
From: Arno Tiemersma @ 2015-01-10 15:00 UTC (permalink / raw)
  To: gregkh, jason, jake, antonysaraev, eric.rost, devel, linux-kernel
  Cc: Arno Tiemersma

Remove do {} while (0) loops around single statements in
skein/skein_block.c

Signed-off-by: Arno Tiemersma <arno.tiemersma@gmail.com>
---
 drivers/staging/skein/skein_block.c | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/skein/skein_block.c b/drivers/staging/skein/skein_block.c
index 66261ab..39dccf8 100644
--- a/drivers/staging/skein/skein_block.c
+++ b/drivers/staging/skein/skein_block.c
@@ -83,9 +83,7 @@ do {                                                                      \
 #else
 /* looping version */
 #define R256(p0, p1, p2, p3, ROT, r_num) \
-do { \
-	ROUND256(p0, p1, p2, p3, ROT, r_num); \
-} while (0)
+	ROUND256(p0, p1, p2, p3, ROT, r_num)
 
 #define I256(R) \
 do { \
@@ -174,9 +172,7 @@ do {                                                                      \
 
 #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)
+	ROUND512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, r_num)
 
 #define I512(R)                                                           \
 do {                                                                      \
@@ -263,10 +259,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 +285,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 {                                                                       \
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] staging: skein: Fix checkpatch warnings
  2015-01-10 15:00 [PATCH] staging: skein: Fix checkpatch warnings Arno Tiemersma
@ 2015-01-12 14:14 ` Jason Cooper
  2015-01-12 14:33   ` Dan Carpenter
  2015-01-17 23:09 ` Greg KH
  1 sibling, 1 reply; 7+ messages in thread
From: Jason Cooper @ 2015-01-12 14:14 UTC (permalink / raw)
  To: Arno Tiemersma; +Cc: gregkh, jake, antonysaraev, eric.rost, devel, linux-kernel

Arno,

On Sat, Jan 10, 2015 at 04:00:47PM +0100, Arno Tiemersma wrote:
> Remove do {} while (0) loops around single statements in
> skein/skein_block.c
> 
> Signed-off-by: Arno Tiemersma <arno.tiemersma@gmail.com>
> ---
>  drivers/staging/skein/skein_block.c | 16 ++++------------
>  1 file changed, 4 insertions(+), 12 deletions(-)

Is this a V2?  Several people have been submitting patches for this
checkpatch issue.  Please check the staging ML and deconflict with other
submitters.

thx,

Jason.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] staging: skein: Fix checkpatch warnings
  2015-01-12 14:14 ` Jason Cooper
@ 2015-01-12 14:33   ` Dan Carpenter
  2015-01-12 14:40     ` Jason Cooper
  0 siblings, 1 reply; 7+ messages in thread
From: Dan Carpenter @ 2015-01-12 14:33 UTC (permalink / raw)
  To: Jason Cooper
  Cc: Arno Tiemersma, devel, eric.rost, gregkh, linux-kernel, jake,
	antonysaraev

On Mon, Jan 12, 2015 at 09:14:18AM -0500, Jason Cooper wrote:
> Arno,
> 
> On Sat, Jan 10, 2015 at 04:00:47PM +0100, Arno Tiemersma wrote:
> > Remove do {} while (0) loops around single statements in
> > skein/skein_block.c
> > 
> > Signed-off-by: Arno Tiemersma <arno.tiemersma@gmail.com>
> > ---
> >  drivers/staging/skein/skein_block.c | 16 ++++------------
> >  1 file changed, 4 insertions(+), 12 deletions(-)
> 
> Is this a V2?  Several people have been submitting patches for this
> checkpatch issue.  Please check the staging ML and deconflict with other
> submitters.

Why would it be a v2?

It's really normal to get a wave of people sending the exact same patch.
There was one time where 7 people deleted the same whitespace in
panel.c.

Don't worry too much about conflicts.  It either applies when Greg reads
it or it doesn't and he kicks off an email.  Not a big deal.

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] staging: skein: Fix checkpatch warnings
  2015-01-12 14:33   ` Dan Carpenter
@ 2015-01-12 14:40     ` Jason Cooper
  0 siblings, 0 replies; 7+ messages in thread
From: Jason Cooper @ 2015-01-12 14:40 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Arno Tiemersma, devel, eric.rost, gregkh, linux-kernel, jake,
	antonysaraev

On Mon, Jan 12, 2015 at 05:33:47PM +0300, Dan Carpenter wrote:
> On Mon, Jan 12, 2015 at 09:14:18AM -0500, Jason Cooper wrote:
> > Arno,
> > 
> > On Sat, Jan 10, 2015 at 04:00:47PM +0100, Arno Tiemersma wrote:
> > > Remove do {} while (0) loops around single statements in
> > > skein/skein_block.c
> > > 
> > > Signed-off-by: Arno Tiemersma <arno.tiemersma@gmail.com>
> > > ---
> > >  drivers/staging/skein/skein_block.c | 16 ++++------------
> > >  1 file changed, 4 insertions(+), 12 deletions(-)
> > 
> > Is this a V2?  Several people have been submitting patches for this
> > checkpatch issue.  Please check the staging ML and deconflict with other
> > submitters.
> 
> Why would it be a v2?

I had asked one person to do a little extra work validating that
removing the do{}while's hadn't changed the resulting object code.
Unfortunately, I forgot who that was :(  Only because there have been so
many people submitting the exact same thing, though...

> It's really normal to get a wave of people sending the exact same patch.
> There was one time where 7 people deleted the same whitespace in
> panel.c.

I suspect this is a combination of a) checkpatch.pl getting a more
enhanced handling of do{}while's in macros, and b) more folks doing the
Eudiptula (sp?) challenge.

> Don't worry too much about conflicts.  It either applies when Greg reads
> it or it doesn't and he kicks off an email.  Not a big deal.

Agreed from a patch management side.  I was attempting to encourage the
new submitters to starting integrating the mailinglist into their
workflow.

thx,

Jason.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] staging: skein: Fix checkpatch warnings
  2015-01-10 15:00 [PATCH] staging: skein: Fix checkpatch warnings Arno Tiemersma
  2015-01-12 14:14 ` Jason Cooper
@ 2015-01-17 23:09 ` Greg KH
  1 sibling, 0 replies; 7+ messages in thread
From: Greg KH @ 2015-01-17 23:09 UTC (permalink / raw)
  To: Arno Tiemersma; +Cc: jason, jake, antonysaraev, eric.rost, devel, linux-kernel

On Sat, Jan 10, 2015 at 04:00:47PM +0100, Arno Tiemersma wrote:
> Remove do {} while (0) loops around single statements in
> skein/skein_block.c
> 
> Signed-off-by: Arno Tiemersma <arno.tiemersma@gmail.com>
> ---
>  drivers/staging/skein/skein_block.c | 16 ++++------------
>  1 file changed, 4 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/staging/skein/skein_block.c b/drivers/staging/skein/skein_block.c
> index 66261ab..39dccf8 100644
> --- a/drivers/staging/skein/skein_block.c
> +++ b/drivers/staging/skein/skein_block.c
> @@ -83,9 +83,7 @@ do {                                                                      \
>  #else
>  /* looping version */
>  #define R256(p0, p1, p2, p3, ROT, r_num) \
> -do { \
> -	ROUND256(p0, p1, p2, p3, ROT, r_num); \
> -} while (0)
> +	ROUND256(p0, p1, p2, p3, ROT, r_num)
>  
>  #define I256(R) \
>  do { \
> @@ -174,9 +172,7 @@ do {                                                                      \
>  
>  #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)
> +	ROUND512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, r_num)
>  
>  #define I512(R)                                                           \
>  do {                                                                      \
> @@ -263,10 +259,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 +285,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 {                                                                       \
> -- 
> 2.1.0
> 

Doesn't apply to my tree :(

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] staging: skein: Fix checkpatch warnings
  2014-12-25 18:01 arno.tiemersma
@ 2014-12-25 18:06 ` Joe Perches
  0 siblings, 0 replies; 7+ messages in thread
From: Joe Perches @ 2014-12-25 18:06 UTC (permalink / raw)
  To: arno.tiemersma; +Cc: linux-kernel

On Thu, 2014-12-25 at 19:01 +0100, arno.tiemersma@gmail.com wrote:
> Remove do {} while (0) loops around single statements in
> skein/skein_block.c
[]
> diff --git a/drivers/staging/skein/skein_block.c b/drivers/staging/skein/skein_block.c
[]
> @@ -83,9 +83,7 @@ do {                                                                      \
>  #else
>  /* looping version */
>  #define R256(p0, p1, p2, p3, ROT, r_num) \
> -do { \
>  	ROUND256(p0, p1, p2, p3, ROT, r_num); \

When you do these things, you also have to
remove the trailing semi-colon and the
line continuation '\' as well.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] staging: skein: Fix checkpatch warnings
@ 2014-12-25 18:01 arno.tiemersma
  2014-12-25 18:06 ` Joe Perches
  0 siblings, 1 reply; 7+ messages in thread
From: arno.tiemersma @ 2014-12-25 18:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arno Tiemersma

From: Arno Tiemersma <arno.tiemersma@gmail.com>

Remove do {} while (0) loops around single statements in
skein/skein_block.c

Signed-off-by: Arno Tiemersma <arno.tiemersma@gmail.com>
---
 drivers/staging/skein/skein_block.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/staging/skein/skein_block.c b/drivers/staging/skein/skein_block.c
index 66261ab..d608dee 100644
--- a/drivers/staging/skein/skein_block.c
+++ b/drivers/staging/skein/skein_block.c
@@ -83,9 +83,7 @@ do {                                                                      \
 #else
 /* looping version */
 #define R256(p0, p1, p2, p3, ROT, r_num) \
-do { \
 	ROUND256(p0, p1, p2, p3, ROT, r_num); \
-} while (0)
 
 #define I256(R) \
 do { \
@@ -174,9 +172,7 @@ do {                                                                      \
 
 #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 I512(R)                                                           \
 do {                                                                      \
@@ -263,10 +259,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)
 
 #define I1024(R)                                                          \
 do {                                                                      \
@@ -291,10 +285,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)
 
 #define I1024(R)                                                           \
 do {                                                                       \
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-01-17 23:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-10 15:00 [PATCH] staging: skein: Fix checkpatch warnings Arno Tiemersma
2015-01-12 14:14 ` Jason Cooper
2015-01-12 14:33   ` Dan Carpenter
2015-01-12 14:40     ` Jason Cooper
2015-01-17 23:09 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2014-12-25 18:01 arno.tiemersma
2014-12-25 18:06 ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).