[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220408142351.16961-1-hanyihao@vivo.com>
Date: Fri, 8 Apr 2022 07:23:49 -0700
From: Yihao Han <hanyihao@...o.com>
To: Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>,
Julia Lawall <Julia.Lawall@...ia.fr>,
Linus Walleij <linus.walleij@...aro.org>,
Yihao Han <hanyihao@...o.com>,
Zhen Lei <thunder.leizhen@...wei.com>,
YueHaibing <yuehaibing@...wei.com>, linux-crypto@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: kernel@...o.com
Subject: [PATCH] crypto: ux500/hash - simplify if-if to if-else
Replace `if (!req_ctx->updated)` with `else` for simplification
and add curly brackets according to the kernel coding style:
"Do not unnecessarily use braces where a single statement will do."
...
"This does not apply if only one branch of a conditional statement is
a single statement; in the latter case use braces in both branches"
Please refer to:
https://www.kernel.org/doc/html/v5.17-rc8/process/coding-style.html
Signed-off-by: Yihao Han <hanyihao@...o.com>
---
drivers/crypto/ux500/hash/hash_core.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/crypto/ux500/hash/hash_core.c b/drivers/crypto/ux500/hash/hash_core.c
index 5157c118d642..265ef3e96fdd 100644
--- a/drivers/crypto/ux500/hash/hash_core.c
+++ b/drivers/crypto/ux500/hash/hash_core.c
@@ -877,9 +877,7 @@ static int hash_dma_final(struct ahash_request *req)
__func__);
goto out;
}
- }
-
- if (!req_ctx->updated) {
+ } else {
ret = hash_setconfiguration(device_data, &ctx->config);
if (ret) {
dev_err(device_data->dev,
--
2.17.1
Powered by blists - more mailing lists