]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
crypto: stm32 - remove unnecessary alignmask
authorEric Biggers <ebiggers@google.com>
Thu, 19 Oct 2023 05:53:28 +0000 (22:53 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 27 Oct 2023 10:04:24 +0000 (18:04 +0800)
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>
drivers/crypto/stm32/stm32-crc32.c

index 90a920e7f6642ff4eb2bee37d81c28c46548eee0..fa4fec31fcfc4de6d9a1f4146a20e99c9a20f429 100644 (file)
@@ -283,7 +283,6 @@ static struct shash_alg algs[] = {
                        .cra_priority           = 200,
                        .cra_flags              = CRYPTO_ALG_OPTIONAL_KEY,
                        .cra_blocksize          = CHKSUM_BLOCK_SIZE,
-                       .cra_alignmask          = 3,
                        .cra_ctxsize            = sizeof(struct stm32_crc_ctx),
                        .cra_module             = THIS_MODULE,
                        .cra_init               = stm32_crc32_cra_init,
@@ -305,7 +304,6 @@ static struct shash_alg algs[] = {
                        .cra_priority           = 200,
                        .cra_flags              = CRYPTO_ALG_OPTIONAL_KEY,
                        .cra_blocksize          = CHKSUM_BLOCK_SIZE,
-                       .cra_alignmask          = 3,
                        .cra_ctxsize            = sizeof(struct stm32_crc_ctx),
                        .cra_module             = THIS_MODULE,
                        .cra_init               = stm32_crc32c_cra_init,