Linux Kernels

staging: skein: cleanup: Fixed operator whitespace

This change “staging: skein: cleanup: Fixed operator whitespace” (commit 5b05c1e) in Linux kernel is authored by Manu Kumar <maraku [at] gmx.com> on Sun May 1 16:38:33 2016 -0700.

Description of "staging: skein: cleanup: Fixed operator whitespace"

The change “staging: skein: cleanup: Fixed operator whitespace” introduces changes as follows.

staging: skein: cleanup: Fixed operator whitespace

added operator white space and parentheses for readability

Signed-off-by: Manu Kumar <maraku@gmx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Linux kernel releases containing commit 5b05c1e

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "staging: skein: cleanup: Fixed operator whitespace"

There are 32 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/staging/skein/skein_base.c  | 24 ++++++++++++------------
 drivers/staging/skein/skein_block.c |  8 ++++----
 2 files changed, 16 insertions(+), 16 deletions(-)
 
diff --git a/drivers/staging/skein/skein_base.c b/drivers/staging/skein/skein_base.c
index dde6f7ed2c3e..a4c3c0cecd90 100644
--- a/drivers/staging/skein/skein_base.c
+++ b/drivers/staging/skein/skein_base.c
@@ -230,8 +230,8 @@ int skein_256_final(struct skein_256_ctx *ctx, u8 *hash_val)
 		if (n >= SKEIN_256_BLOCK_BYTES)
 			n  = SKEIN_256_BLOCK_BYTES;
 		/* "output" the ctr mode bytes */
-		skein_put64_lsb_first(hash_val + i * SKEIN_256_BLOCK_BYTES,
-				      ctx->x, n);
+		skein_put64_lsb_first(hash_val + (i * SKEIN_256_BLOCK_BYTES),
+				ctx->x, n);
 		/* restore the counter mode key for next time */
 		memcpy(ctx->x, x, sizeof(x));
 	}
@@ -457,8 +457,8 @@ int skein_512_final(struct skein_512_ctx *ctx, u8 *hash_val)
 		if (n >= SKEIN_512_BLOCK_BYTES)
 			n  = SKEIN_512_BLOCK_BYTES;
 		/* "output" the ctr mode bytes */
-		skein_put64_lsb_first(hash_val + i * SKEIN_512_BLOCK_BYTES,
-				      ctx->x, n);
+		skein_put64_lsb_first(hash_val + (i * SKEIN_512_BLOCK_BYTES),
+				ctx->x, n);
 		/* restore the counter mode key for next time */
 		memcpy(ctx->x, x, sizeof(x));
 	}
@@ -679,8 +679,8 @@ int skein_1024_final(struct skein_1024_ctx *ctx, u8 *hash_val)
 		if (n >= SKEIN_1024_BLOCK_BYTES)
 			n  = SKEIN_1024_BLOCK_BYTES;
 		/* "output" the ctr mode bytes */
-		skein_put64_lsb_first(hash_val + i * SKEIN_1024_BLOCK_BYTES,
-				      ctx->x, n);
+		skein_put64_lsb_first(hash_val + (i * SKEIN_1024_BLOCK_BYTES),
+				ctx->x, n);
 		/* restore the counter mode key for next time */
 		memcpy(ctx->x, x, sizeof(x));
 	}
@@ -786,8 +786,8 @@ int skein_256_output(struct skein_256_ctx *ctx, u8 *hash_val)
 		if (n >= SKEIN_256_BLOCK_BYTES)
 			n  = SKEIN_256_BLOCK_BYTES;
 		/* "output" the ctr mode bytes */
-		skein_put64_lsb_first(hash_val + i * SKEIN_256_BLOCK_BYTES,
-				      ctx->x, n);
+		skein_put64_lsb_first(hash_val + (i * SKEIN_256_BLOCK_BYTES),
+				ctx->x, n);
 		/* restore the counter mode key for next time */
 		memcpy(ctx->x, x, sizeof(x));
 	}
@@ -823,8 +823,8 @@ int skein_512_output(struct skein_512_ctx *ctx, u8 *hash_val)
 		if (n >= SKEIN_512_BLOCK_BYTES)
 			n  = SKEIN_512_BLOCK_BYTES;
 		/* "output" the ctr mode bytes */
-		skein_put64_lsb_first(hash_val + i * SKEIN_512_BLOCK_BYTES,
-				      ctx->x, n);
+		skein_put64_lsb_first(hash_val + (i * SKEIN_512_BLOCK_BYTES),
+				ctx->x, n);
 		/* restore the counter mode key for next time */
 		memcpy(ctx->x, x, sizeof(x));
 	}
@@ -860,8 +860,8 @@ int skein_1024_output(struct skein_1024_ctx *ctx, u8 *hash_val)
 		if (n >= SKEIN_1024_BLOCK_BYTES)
 			n  = SKEIN_1024_BLOCK_BYTES;
 		/* "output" the ctr mode bytes */
-		skein_put64_lsb_first(hash_val + i * SKEIN_1024_BLOCK_BYTES,
-				      ctx->x, n);
+		skein_put64_lsb_first(hash_val + (i * SKEIN_1024_BLOCK_BYTES),
+				ctx->x, n);
 		/* restore the counter mode key for next time */
 		memcpy(ctx->x, x, sizeof(x));
 	}
diff --git a/drivers/staging/skein/skein_block.c b/drivers/staging/skein/skein_block.c
index 1155758f9732..7a8128ac209c 100644
--- a/drivers/staging/skein/skein_block.c
+++ b/drivers/staging/skein/skein_block.c
@@ -326,10 +326,10 @@
 		R1024(00, 09, 02, 13, 06, 11, 04, 15, 10, 07, 12, 03, 14, \
 		      05, 08, 01, R1024_5, 8 * (R) + 6);                  \
 		R1024(00, 07, 02, 05, 04, 03, 06, 01, 12, 15, 14, 13, 08, \
-		      11, 10, 09, R1024_6, 8  * (R) + 7);                 \
+		      11, 10, 09, R1024_6, 8 * (R) + 7);                  \
 		R1024(00, 15, 02, 11, 06, 13, 04, 09, 14, 01, 08, 05, 10, \
 		      03, 12, 07, R1024_7, 8 * (R) + 8);                  \
-		I1024(2 * (R) + 1);                                        \
+		I1024(2 * (R) + 1);                                       \
 	} while (0)
 
 #define R1024_UNROLL_R(NN)                              \
@@ -353,7 +353,7 @@ void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blk_ptr,
 	size_t r;
 #if SKEIN_UNROLL_256
 	/* key schedule: chaining vars + tweak + "rot"*/
-	u64  kw[WCNT + 4 + RCNT * 2];
+	u64  kw[WCNT + 4 + (RCNT * 2)];
 #else
 	/* key schedule words : chaining vars + tweak */
 	u64  kw[WCNT + 4];
@@ -635,7 +635,7 @@ void skein_1024_process_block(struct skein_1024_ctx *ctx, const u8 *blk_ptr,
 	size_t  r;
 #if (SKEIN_UNROLL_1024 != 0)
 	/* key sched: chaining vars + tweak + "rot" */
-	u64  kw[WCNT + 4 + RCNT * 2];
+	u64  kw[WCNT + 4 + (RCNT * 2)];
 #else
 	/* key schedule words : chaining vars + tweak */
 	u64  kw[WCNT + 4];

The commit for this change in Linux stable tree is 5b05c1e (patch).

Last modified: 2020/01/11 09:44