mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:04:41 +01:00
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:
parent
280bfc3eb5
commit
b4f275b92d
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue