staging: skein: cleanup: removed unnecessary cast spaces
Spaces after casts are removed Signed-off-by: Manu Kumar <maraku@gmx.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Родитель
5b05c1e243
Коммит
e602a80822
|
@ -209,7 +209,7 @@ int skein_update_bits(struct skein_ctx *ctx, const u8 *msg,
|
|||
/* internal sanity check: there IS a partial byte in the buffer! */
|
||||
skein_assert(length != 0);
|
||||
/* partial byte bit mask */
|
||||
mask = (u8) (1u << (7 - (msg_bit_cnt & 7)));
|
||||
mask = (u8)(1u << (7 - (msg_bit_cnt & 7)));
|
||||
/* apply bit padding on final byte (in the buffer) */
|
||||
up[length - 1] = (u8)((up[length - 1] & (0 - mask)) | mask);
|
||||
|
||||
|
|
|
@ -221,7 +221,7 @@ int skein_256_final(struct skein_256_ctx *ctx, u8 *hash_val)
|
|||
memcpy(x, ctx->x, sizeof(x));
|
||||
for (i = 0; i * SKEIN_256_BLOCK_BYTES < byte_cnt; i++) {
|
||||
/* build the counter block */
|
||||
((u64 *)ctx->b)[0] = skein_swap64((u64) i);
|
||||
((u64 *)ctx->b)[0] = skein_swap64((u64)i);
|
||||
skein_start_new_type(ctx, OUT_FINAL);
|
||||
/* run "counter mode" */
|
||||
skein_256_process_block(ctx, ctx->b, 1, sizeof(u64));
|
||||
|
@ -448,7 +448,7 @@ int skein_512_final(struct skein_512_ctx *ctx, u8 *hash_val)
|
|||
memcpy(x, ctx->x, sizeof(x));
|
||||
for (i = 0; i * SKEIN_512_BLOCK_BYTES < byte_cnt; i++) {
|
||||
/* build the counter block */
|
||||
((u64 *)ctx->b)[0] = skein_swap64((u64) i);
|
||||
((u64 *)ctx->b)[0] = skein_swap64((u64)i);
|
||||
skein_start_new_type(ctx, OUT_FINAL);
|
||||
/* run "counter mode" */
|
||||
skein_512_process_block(ctx, ctx->b, 1, sizeof(u64));
|
||||
|
@ -670,7 +670,7 @@ int skein_1024_final(struct skein_1024_ctx *ctx, u8 *hash_val)
|
|||
memcpy(x, ctx->x, sizeof(x));
|
||||
for (i = 0; i * SKEIN_1024_BLOCK_BYTES < byte_cnt; i++) {
|
||||
/* build the counter block */
|
||||
((u64 *)ctx->b)[0] = skein_swap64((u64) i);
|
||||
((u64 *)ctx->b)[0] = skein_swap64((u64)i);
|
||||
skein_start_new_type(ctx, OUT_FINAL);
|
||||
/* run "counter mode" */
|
||||
skein_1024_process_block(ctx, ctx->b, 1, sizeof(u64));
|
||||
|
@ -777,7 +777,7 @@ int skein_256_output(struct skein_256_ctx *ctx, u8 *hash_val)
|
|||
memcpy(x, ctx->x, sizeof(x));
|
||||
for (i = 0; i * SKEIN_256_BLOCK_BYTES < byte_cnt; i++) {
|
||||
/* build the counter block */
|
||||
((u64 *)ctx->b)[0] = skein_swap64((u64) i);
|
||||
((u64 *)ctx->b)[0] = skein_swap64((u64)i);
|
||||
skein_start_new_type(ctx, OUT_FINAL);
|
||||
/* run "counter mode" */
|
||||
skein_256_process_block(ctx, ctx->b, 1, sizeof(u64));
|
||||
|
@ -814,7 +814,7 @@ int skein_512_output(struct skein_512_ctx *ctx, u8 *hash_val)
|
|||
memcpy(x, ctx->x, sizeof(x));
|
||||
for (i = 0; i * SKEIN_512_BLOCK_BYTES < byte_cnt; i++) {
|
||||
/* build the counter block */
|
||||
((u64 *)ctx->b)[0] = skein_swap64((u64) i);
|
||||
((u64 *)ctx->b)[0] = skein_swap64((u64)i);
|
||||
skein_start_new_type(ctx, OUT_FINAL);
|
||||
/* run "counter mode" */
|
||||
skein_512_process_block(ctx, ctx->b, 1, sizeof(u64));
|
||||
|
@ -851,7 +851,7 @@ int skein_1024_output(struct skein_1024_ctx *ctx, u8 *hash_val)
|
|||
memcpy(x, ctx->x, sizeof(x));
|
||||
for (i = 0; i * SKEIN_1024_BLOCK_BYTES < byte_cnt; i++) {
|
||||
/* build the counter block */
|
||||
((u64 *)ctx->b)[0] = skein_swap64((u64) i);
|
||||
((u64 *)ctx->b)[0] = skein_swap64((u64)i);
|
||||
skein_start_new_type(ctx, OUT_FINAL);
|
||||
/* run "counter mode" */
|
||||
skein_1024_process_block(ctx, ctx->b, 1, sizeof(u64));
|
||||
|
|
|
@ -157,13 +157,13 @@ int skein_1024_output(struct skein_1024_ctx *ctx, u8 *hash_val);
|
|||
#define SKEIN_T1_POS_FINAL SKEIN_T1_BIT(127) /* 127 final blk flag */
|
||||
|
||||
/* tweak word tweak[1]: flag bit definition(s) */
|
||||
#define SKEIN_T1_FLAG_FIRST (((u64) 1) << SKEIN_T1_POS_FIRST)
|
||||
#define SKEIN_T1_FLAG_FINAL (((u64) 1) << SKEIN_T1_POS_FINAL)
|
||||
#define SKEIN_T1_FLAG_BIT_PAD (((u64) 1) << SKEIN_T1_POS_BIT_PAD)
|
||||
#define SKEIN_T1_FLAG_FIRST (((u64)1) << SKEIN_T1_POS_FIRST)
|
||||
#define SKEIN_T1_FLAG_FINAL (((u64)1) << SKEIN_T1_POS_FINAL)
|
||||
#define SKEIN_T1_FLAG_BIT_PAD (((u64)1) << SKEIN_T1_POS_BIT_PAD)
|
||||
|
||||
/* tweak word tweak[1]: tree level bit field mask */
|
||||
#define SKEIN_T1_TREE_LVL_MASK (((u64)0x7F) << SKEIN_T1_POS_TREE_LVL)
|
||||
#define SKEIN_T1_TREE_LEVEL(n) (((u64) (n)) << SKEIN_T1_POS_TREE_LVL)
|
||||
#define SKEIN_T1_TREE_LEVEL(n) (((u64)(n)) << SKEIN_T1_POS_TREE_LVL)
|
||||
|
||||
/* tweak word tweak[1]: block type field */
|
||||
#define SKEIN_BLK_TYPE_KEY (0) /* key, for MAC and KDF */
|
||||
|
@ -176,7 +176,7 @@ int skein_1024_output(struct skein_1024_ctx *ctx, u8 *hash_val);
|
|||
#define SKEIN_BLK_TYPE_OUT (63) /* output stage */
|
||||
#define SKEIN_BLK_TYPE_MASK (63) /* bit field mask */
|
||||
|
||||
#define SKEIN_T1_BLK_TYPE(T) (((u64) (SKEIN_BLK_TYPE_##T)) << \
|
||||
#define SKEIN_T1_BLK_TYPE(T) (((u64)(SKEIN_BLK_TYPE_##T)) << \
|
||||
SKEIN_T1_POS_BLK_TYPE)
|
||||
#define SKEIN_T1_BLK_TYPE_KEY SKEIN_T1_BLK_TYPE(KEY) /* for MAC and KDF */
|
||||
#define SKEIN_T1_BLK_TYPE_CFG SKEIN_T1_BLK_TYPE(CFG) /* config block */
|
||||
|
@ -199,7 +199,7 @@ int skein_1024_output(struct skein_1024_ctx *ctx, u8 *hash_val);
|
|||
#define SKEIN_ID_STRING_LE (0x33414853) /* "SHA3" (little-endian)*/
|
||||
#endif
|
||||
|
||||
#define SKEIN_MK_64(hi32, lo32) ((lo32) + (((u64) (hi32)) << 32))
|
||||
#define SKEIN_MK_64(hi32, lo32) ((lo32) + (((u64)(hi32)) << 32))
|
||||
#define SKEIN_SCHEMA_VER SKEIN_MK_64(SKEIN_VERSION, SKEIN_ID_STRING_LE)
|
||||
#define SKEIN_KS_PARITY SKEIN_MK_64(0x1BD11BDA, 0xA9FC1A22)
|
||||
|
||||
|
|
|
@ -462,8 +462,8 @@ void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blk_ptr,
|
|||
#if defined(SKEIN_CODE_SIZE) || defined(SKEIN_PERF)
|
||||
size_t skein_256_process_block_code_size(void)
|
||||
{
|
||||
return ((u8 *) skein_256_process_block_code_size) -
|
||||
((u8 *) skein_256_process_block);
|
||||
return ((u8 *)skein_256_process_block_code_size) -
|
||||
((u8 *)skein_256_process_block);
|
||||
}
|
||||
|
||||
unsigned int skein_256_unroll_cnt(void)
|
||||
|
@ -613,8 +613,8 @@ void skein_512_process_block(struct skein_512_ctx *ctx, const u8 *blk_ptr,
|
|||
#if defined(SKEIN_CODE_SIZE) || defined(SKEIN_PERF)
|
||||
size_t skein_512_process_block_code_size(void)
|
||||
{
|
||||
return ((u8 *) skein_512_process_block_code_size) -
|
||||
((u8 *) skein_512_process_block);
|
||||
return ((u8 *)skein_512_process_block_code_size) -
|
||||
((u8 *)skein_512_process_block);
|
||||
}
|
||||
|
||||
unsigned int skein_512_unroll_cnt(void)
|
||||
|
@ -778,8 +778,8 @@ void skein_1024_process_block(struct skein_1024_ctx *ctx, const u8 *blk_ptr,
|
|||
#if defined(SKEIN_CODE_SIZE) || defined(SKEIN_PERF)
|
||||
size_t skein_1024_process_block_code_size(void)
|
||||
{
|
||||
return ((u8 *) skein_1024_process_block_code_size) -
|
||||
((u8 *) skein_1024_process_block);
|
||||
return ((u8 *)skein_1024_process_block_code_size) -
|
||||
((u8 *)skein_1024_process_block);
|
||||
}
|
||||
|
||||
unsigned int skein_1024_unroll_cnt(void)
|
||||
|
|
Загрузка…
Ссылка в новой задаче