Skip to content

Commit

Permalink
arm64/crypto: remove redundant update of data
Browse files Browse the repository at this point in the history
Originally found by cppcheck:

[arch/arm64/crypto/sha2-ce-glue.c:153]: (warning) Assignment of
  function parameter has no effect outside the function. Did you
  forget dereferencing it?

Updating data by blocks * SHA256_BLOCK_SIZE at the end of
sha2_finup is redundant code and can be removed.

Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
  • Loading branch information
Colin Ian King authored and Will Deacon committed Aug 26, 2014
1 parent 52addcf commit 031cb42
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion arch/arm64/crypto/sha2-ce-glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ static void sha2_finup(struct shash_desc *desc, const u8 *data,
kernel_neon_begin_partial(28);
sha2_ce_transform(blocks, data, sctx->state, NULL, len);
kernel_neon_end();
data += blocks * SHA256_BLOCK_SIZE;
}

static int sha224_finup(struct shash_desc *desc, const u8 *data,
Expand Down

0 comments on commit 031cb42

Please sign in to comment.