mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jason Cooper <jason@lakedaemon.net>
To: Hugo Miguel Silva Ferreira <hugo8899@gmail.com>
Cc: linux-kernel@vger.kernel.org, joe@perches.com,
	gregkh@linuxfoundation.org
Subject: Re: [PATCH] staging: skein: cleanup: Remove multiple blank lines
Date: Fri, 15 Jul 2016 15:37:16 +0000	[thread overview]
Message-ID: <20160715153716.GE31509@io.lakedaemon.net> (raw)
In-Reply-To: <20160715005440.GA6314@miho-VirtualBox>

Hi Hugo,

On Fri, Jul 15, 2016 at 01:54:40AM +0100, Hugo Miguel Silva Ferreira wrote:
> This patch fixes several warnings detected by the checkpatch.pl script.
> 
> Signed-off-by: Hugo Miguel Silva Ferreira <hugo8899@gmail.com>
> ---
>  drivers/staging/skein/threefish_block.c | 16 ----------------
>  1 file changed, 16 deletions(-)

Sorry, but that's a Nack from me.

> diff --git a/drivers/staging/skein/threefish_block.c b/drivers/staging/skein/threefish_block.c
> index a95563f..5064065 100644
> --- a/drivers/staging/skein/threefish_block.c
> +++ b/drivers/staging/skein/threefish_block.c
> @@ -64,7 +64,6 @@ void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input,
>  	b2 += b1;
>  	b1 = rol64(b1, 32) ^ b2;
>  
> -

If you look at the source code now versus the source code I started with
from Werner Dittman, you'll see that the extra blank line conveys
information about grouping of operations.

The proper 'fix' here is to use a comment at the beginning of each
grouping, instead of the extra blank line.

thx,

Jason.

>  	b1 += k3 + t2;
>  	b0 += b1 + k2;
>  	b1 = rol64(b1, 14) ^ b0;
> @@ -117,7 +116,6 @@ void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input,
>  	b2 += b1;
>  	b1 = rol64(b1, 32) ^ b2;
>  
> -
>  	b1 += k0 + t1;
>  	b0 += b1 + k4;
>  	b1 = rol64(b1, 14) ^ b0;
> @@ -170,7 +168,6 @@ void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input,
>  	b2 += b1;
>  	b1 = rol64(b1, 32) ^ b2;
>  
> -
>  	b1 += k2 + t0;
>  	b0 += b1 + k1;
>  	b1 = rol64(b1, 14) ^ b0;
> @@ -223,7 +220,6 @@ void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input,
>  	b2 += b1;
>  	b1 = rol64(b1, 32) ^ b2;
>  
> -
>  	b1 += k4 + t2;
>  	b0 += b1 + k3;
>  	b1 = rol64(b1, 14) ^ b0;
> @@ -276,7 +272,6 @@ void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input,
>  	b2 += b1;
>  	b1 = rol64(b1, 32) ^ b2;
>  
> -
>  	b1 += k1 + t1;
>  	b0 += b1 + k0;
>  	b1 = rol64(b1, 14) ^ b0;
> @@ -329,7 +324,6 @@ void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input,
>  	b2 += b1;
>  	b1 = rol64(b1, 32) ^ b2;
>  
> -
>  	b1 += k3 + t0;
>  	b0 += b1 + k2;
>  	b1 = rol64(b1, 14) ^ b0;
> @@ -382,7 +376,6 @@ void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input,
>  	b2 += b1;
>  	b1 = rol64(b1, 32) ^ b2;
>  
> -
>  	b1 += k0 + t2;
>  	b0 += b1 + k4;
>  	b1 = rol64(b1, 14) ^ b0;
> @@ -435,7 +428,6 @@ void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input,
>  	b2 += b1;
>  	b1 = rol64(b1, 32) ^ b2;
>  
> -
>  	b1 += k2 + t1;
>  	b0 += b1 + k1;
>  	b1 = rol64(b1, 14) ^ b0;
> @@ -579,7 +571,6 @@ void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input,
>  	b2 -= b3 + k3 + t2;
>  	b3 -= k4 + 16;
>  
> -
>  	tmp = b3 ^ b0;
>  	b3 = ror64(tmp, 32);
>  	b0 -= b3;
> @@ -648,7 +639,6 @@ void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input,
>  	b2 -= b3 + k1 + t0;
>  	b3 -= k2 + 14;
>  
> -
>  	tmp = b3 ^ b0;
>  	b3 = ror64(tmp, 32);
>  	b0 -= b3;
> @@ -717,7 +707,6 @@ void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input,
>  	b2 -= b3 + k4 + t1;
>  	b3 -= k0 + 12;
>  
> -
>  	tmp = b3 ^ b0;
>  	b3 = ror64(tmp, 32);
>  	b0 -= b3;
> @@ -786,7 +775,6 @@ void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input,
>  	b2 -= b3 + k2 + t2;
>  	b3 -= k3 + 10;
>  
> -
>  	tmp = b3 ^ b0;
>  	b3 = ror64(tmp, 32);
>  	b0 -= b3;
> @@ -855,7 +843,6 @@ void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input,
>  	b2 -= b3 + k0 + t0;
>  	b3 -= k1 + 8;
>  
> -
>  	tmp = b3 ^ b0;
>  	b3 = ror64(tmp, 32);
>  	b0 -= b3;
> @@ -924,7 +911,6 @@ void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input,
>  	b2 -= b3 + k3 + t1;
>  	b3 -= k4 + 6;
>  
> -
>  	tmp = b3 ^ b0;
>  	b3 = ror64(tmp, 32);
>  	b0 -= b3;
> @@ -993,7 +979,6 @@ void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input,
>  	b2 -= b3 + k1 + t2;
>  	b3 -= k2 + 4;
>  
> -
>  	tmp = b3 ^ b0;
>  	b3 = ror64(tmp, 32);
>  	b0 -= b3;
> @@ -1062,7 +1047,6 @@ void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input,
>  	b2 -= b3 + k4 + t0;
>  	b3 -= k0 + 2;
>  
> -
>  	tmp = b3 ^ b0;
>  	b3 = ror64(tmp, 32);
>  	b0 -= b3;
> -- 
> 2.7.4
> 

      reply	other threads:[~2016-07-15 15:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-15  0:54 Hugo Miguel Silva Ferreira
2016-07-15 15:37 ` Jason Cooper [this message]

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=20160715153716.GE31509@io.lakedaemon.net \
    --to=jason@lakedaemon.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=hugo8899@gmail.com \
    --cc=joe@perches.com \
    --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®