crypto: simd - Simplify request size calculation in simd_aead_init
PATCH 1/1 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 <[email protected]>
--- crypto/simd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
crypto/simd.c +2 -2
@@ -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);
Signature · 2 lines
Thorsten Blum <[email protected]> GPG: 1D60 735E 8AEF 3BE4 73B6 9D84 7336 78FD 8DFE EAD4
Herbert Xu
maintainerQuoted 6 lines · Thorsten Blum
Fold both assignments into a single
max()call to simplify the code.Signed-off-by Thorsten Blum <[email protected]>--- crypto/simd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt