Commit 78930e7c authored by Manu Kumar's avatar Manu Kumar Committed by Greg Kroah-Hartman
Browse files

staging: skein: cleanup: add operator white space



Added white space between operators and operands. Because this sometimes
maxed out the column width, some expressions were broken up into multiple
lines, and comments were moved appropriately.

Signed-off-by: default avatarManu Kumar <maraku@gmx.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 60b3109e
Loading
Loading
Loading
Loading
+33 −33
Original line number Diff line number Diff line
@@ -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));
	}
+25 −21
Original line number Diff line number Diff line
@@ -482,9 +482,11 @@ void skein_512_process_block(struct skein_512_ctx *ctx, const u8 *blk_ptr,
	};
	size_t  r;
#if SKEIN_UNROLL_512
	u64  kw[WCNT+4+RCNT*2]; /* key sched: chaining vars + tweak + "rot"*/
	/* key sched: chaining vars + tweak + "rot"*/
	u64  kw[WCNT + 4 + RCNT * 2];
#else
	u64  kw[WCNT+4]; /* key schedule words : chaining vars + tweak */
	/* key schedule words : chaining vars + tweak */
	u64  kw[WCNT + 4];
#endif
	u64  X0, X1, X2, X3, X4, X5, X6, X7; /* local copies, for speed */
	u64  w[WCNT]; /* local copy of input block */
@@ -631,9 +633,11 @@ void skein_1024_process_block(struct skein_1024_ctx *ctx, const u8 *blk_ptr,
	};
	size_t  r;
#if (SKEIN_UNROLL_1024 != 0)
	u64  kw[WCNT+4+RCNT*2]; /* key sched: chaining vars + tweak + "rot" */
	/* key sched: chaining vars + tweak + "rot" */
	u64  kw[WCNT + 4 + RCNT * 2];
#else
	u64  kw[WCNT+4]; /* key schedule words : chaining vars + tweak */
	/* key schedule words : chaining vars + tweak */
	u64  kw[WCNT + 4];
#endif

	/* local copy of vars, for speed */
+1 −1

File changed.

Contains only whitespace changes.

+14 −14

File changed.

Contains only whitespace changes.