From: Zhiqi Song <songzhiqi1@huawei.com>
To: <herbert@gondor.apana.org.au>, <davem@davemloft.net>
Cc: <linux-crypto@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<wangzhou1@hisilicon.com>, <fanghao11@huawei.com>,
<prime.zeng@hisilicon.com>
Subject: [PATCH] crypto: cbc - fix coding style
Date: Thu, 1 Apr 2021 15:31:41 +0800 [thread overview]
Message-ID: <1617262301-47010-1-git-send-email-songzhiqi1@huawei.com> (raw)
Fixed following checkpatch error:
- do not use assignment in if condition
Signed-off-by: Zhiqi Song <songzhiqi1@huawei.com>
---
crypto/cbc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/crypto/cbc.c b/crypto/cbc.c
index 6c03e96..152d48d 100644
--- a/crypto/cbc.c
+++ b/crypto/cbc.c
@@ -140,7 +140,8 @@ static int crypto_cbc_decrypt_inplace(struct skcipher_walk *walk,
for (;;) {
fn(tfm, src, src);
- if ((nbytes -= bsize) < bsize)
+ nbytes -= bsize;
+ if (nbytes < bsize)
break;
crypto_xor(src, src - bsize, bsize);
src -= bsize;
--
2.7.4
next reply other threads:[~2021-04-01 7:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-01 7:31 Zhiqi Song [this message]
2021-04-09 7:28 ` [PATCH] crypto: cbc - fix coding style Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1617262301-47010-1-git-send-email-songzhiqi1@huawei.com \
--to=songzhiqi1@huawei.com \
--cc=davem@davemloft.net \
--cc=fanghao11@huawei.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=prime.zeng@hisilicon.com \
--cc=wangzhou1@hisilicon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).