Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm64/crypto: remove redundant update of data

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>

authored by

Colin Ian King and committed by
Will Deacon
031cb428 52addcf9

-1
-1
arch/arm64/crypto/sha2-ce-glue.c
··· 150 150 kernel_neon_begin_partial(28); 151 151 sha2_ce_transform(blocks, data, sctx->state, NULL, len); 152 152 kernel_neon_end(); 153 - data += blocks * SHA256_BLOCK_SIZE; 154 153 } 155 154 156 155 static int sha224_finup(struct shash_desc *desc, const u8 *data,