Commit 5b05c1e2 authored by Manu Kumar's avatar Manu Kumar Committed by Greg Kroah-Hartman

staging: skein: cleanup: Fixed operator whitespace

added operator white space and parentheses for readability
Signed-off-by: default avatarManu Kumar <maraku@gmx.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a28e32e0
......@@ -230,7 +230,7 @@ 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,
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,7 +457,7 @@ 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,
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,7 +679,7 @@ 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,
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,7 +786,7 @@ 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,
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,7 +823,7 @@ 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,
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,7 +860,7 @@ 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,
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));
......
......@@ -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];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment