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

crypto: stm32 - remove unnecessary alignmask

The stm32 crc32 algorithms set a nonzero alignmask, but they don't seem
to actually need it. Their ->update function already has code that
handles aligning the data to the same alignment that the alignmask
specifies, their ->setkey function already uses get_unaligned_le32(),
and their ->final function already uses put_unaligned_le32().
Therefore, stop setting the alignmask. This will allow these algorithms
to keep being registered after alignmask support is removed from shash.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Eric Biggers and committed by
Herbert Xu
0174275a 99240038

-2
-2
drivers/crypto/stm32/stm32-crc32.c
··· 283 283 .cra_priority = 200, 284 284 .cra_flags = CRYPTO_ALG_OPTIONAL_KEY, 285 285 .cra_blocksize = CHKSUM_BLOCK_SIZE, 286 - .cra_alignmask = 3, 287 286 .cra_ctxsize = sizeof(struct stm32_crc_ctx), 288 287 .cra_module = THIS_MODULE, 289 288 .cra_init = stm32_crc32_cra_init, ··· 304 305 .cra_priority = 200, 305 306 .cra_flags = CRYPTO_ALG_OPTIONAL_KEY, 306 307 .cra_blocksize = CHKSUM_BLOCK_SIZE, 307 - .cra_alignmask = 3, 308 308 .cra_ctxsize = sizeof(struct stm32_crc_ctx), 309 309 .cra_module = THIS_MODULE, 310 310 .cra_init = stm32_crc32c_cra_init,