* [PATCH] crypto: simd - Simplify request size calculation in simd_aead_init
@ 2025-12-22 10:42 Thorsten Blum
2026-01-23 5:54 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2025-12-22 10:42 UTC (permalink / raw)
To: Herbert Xu, David S. Miller; +Cc: Thorsten Blum, linux-crypto, linux-kernel
Fold both assignments into a single max() call to simplify the code.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
crypto/simd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/crypto/simd.c b/crypto/simd.c
index b07721d1f3f6..2a7549e280ca 100644
--- a/crypto/simd.c
+++ b/crypto/simd.c
@@ -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);
--
Thorsten Blum <thorsten.blum@linux.dev>
GPG: 1D60 735E 8AEF 3BE4 73B6 9D84 7336 78FD 8DFE EAD4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] crypto: simd - Simplify request size calculation in simd_aead_init
2025-12-22 10:42 [PATCH] crypto: simd - Simplify request size calculation in simd_aead_init Thorsten Blum
@ 2026-01-23 5:54 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2026-01-23 5:54 UTC (permalink / raw)
To: Thorsten Blum; +Cc: David S. Miller, linux-crypto, linux-kernel
On Mon, Dec 22, 2025 at 11:42:53AM +0100, Thorsten Blum wrote:
> Fold both assignments into a single max() call to simplify the code.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
> crypto/simd.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-23 5:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-22 10:42 [PATCH] crypto: simd - Simplify request size calculation in simd_aead_init Thorsten Blum
2026-01-23 5:54 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®