crypto: simd - Simplify request size calculation in simd_aead_init

Fold both assignments into a single max() call to simplify the code.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Thorsten Blum 2025-12-22 11:42:53 +01:00 committed by Herbert Xu
parent 280bfc3eb5
commit b4f275b92d

View file

@ -352,8 +352,8 @@ static int simd_aead_init(struct crypto_aead *tfm)
ctx->cryptd_tfm = cryptd_tfm;
reqsize = crypto_aead_reqsize(cryptd_aead_child(cryptd_tfm));
reqsize = max(reqsize, crypto_aead_reqsize(&cryptd_tfm->base));
reqsize = max(crypto_aead_reqsize(cryptd_aead_child(cryptd_tfm)),
crypto_aead_reqsize(&cryptd_tfm->base));
reqsize += sizeof(struct aead_request);
crypto_aead_set_reqsize(tfm, reqsize);