* [PATCH] crypto: x86/des: remove redundant assignment of variable nbytes
@ 2021-12-07 18:58 Colin Ian King
2021-12-17 8:38 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2021-12-07 18:58 UTC (permalink / raw)
To: Herbert Xu, David S . Miller, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, Dave Hansen, x86, H . Peter Anvin, linux-crypto
Cc: kernel-janitors, linux-kernel
The variable nbytes is being assigned a value that is never read, it is
being re-assigned in the following statement. The assignment is redundant
and can be removed.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
arch/x86/crypto/des3_ede_glue.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/crypto/des3_ede_glue.c b/arch/x86/crypto/des3_ede_glue.c
index e7cb68a3db3b..787c234d2469 100644
--- a/arch/x86/crypto/des3_ede_glue.c
+++ b/arch/x86/crypto/des3_ede_glue.c
@@ -164,7 +164,7 @@ static int cbc_encrypt(struct skcipher_request *req)
err = skcipher_walk_virt(&walk, req, false);
- while ((nbytes = walk.nbytes)) {
+ while (walk.nbytes) {
nbytes = __cbc_encrypt(ctx, &walk);
err = skcipher_walk_done(&walk, nbytes);
}
@@ -243,7 +243,7 @@ static int cbc_decrypt(struct skcipher_request *req)
err = skcipher_walk_virt(&walk, req, false);
- while ((nbytes = walk.nbytes)) {
+ while (walk.nbytes) {
nbytes = __cbc_decrypt(ctx, &walk);
err = skcipher_walk_done(&walk, nbytes);
}
--
2.33.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] crypto: x86/des: remove redundant assignment of variable nbytes
2021-12-07 18:58 [PATCH] crypto: x86/des: remove redundant assignment of variable nbytes Colin Ian King
@ 2021-12-17 8:38 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2021-12-17 8:38 UTC (permalink / raw)
To: Colin Ian King
Cc: David S . Miller, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
Dave Hansen, x86, H . Peter Anvin, linux-crypto, kernel-janitors,
linux-kernel
On Tue, Dec 07, 2021 at 06:58:09PM +0000, Colin Ian King wrote:
> The variable nbytes is being assigned a value that is never read, it is
> being re-assigned in the following statement. The assignment is redundant
> and can be removed.
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
> arch/x86/crypto/des3_ede_glue.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:[~2021-12-17 8:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-07 18:58 [PATCH] crypto: x86/des: remove redundant assignment of variable nbytes Colin Ian King
2021-12-17 8:38 ` Herbert Xu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.