aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/crypto/blowfish_glue.c
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2022-07-07 09:05:46 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2022-07-15 16:43:22 +0800
commit1353e576ae3b7b9703b74f6f2276b6dd450f4a2e (patch)
tree071d33ba2a0e7e59f5db6bc6bf7819fbc4403f14 /arch/x86/crypto/blowfish_glue.c
parentcrypto: sa2ul - Check engine status before enabling (diff)
downloadlinux-dev-1353e576ae3b7b9703b74f6f2276b6dd450f4a2e.tar.xz
linux-dev-1353e576ae3b7b9703b74f6f2276b6dd450f4a2e.zip
crypto: x86/blowfish - remove redundant assignment to variable nytes
Variable nbytes is being assigned a value that is never read, it is being re-assigned in the next statement in the while-loop. The assignment is redundant and can be removed. Cleans up clang scan-build warnings, e.g.: arch/x86/crypto/blowfish_glue.c:147:10: warning: Although the value stored to 'nbytes' is used in the enclosing expression, the value is never actually read from 'nbytes' Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/x86/crypto/blowfish_glue.c')
-rw-r--r--arch/x86/crypto/blowfish_glue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/crypto/blowfish_glue.c b/arch/x86/crypto/blowfish_glue.c
index ba06322c1e39..019c64c1340a 100644
--- a/arch/x86/crypto/blowfish_glue.c
+++ b/arch/x86/crypto/blowfish_glue.c
@@ -144,7 +144,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);
}
@@ -225,7 +225,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);
}