[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <000901d91f4b$20c2dcf0$624896d0$@foss.st.com>
Date: Tue, 3 Jan 2023 09:12:24 +0100
From: <lionel.debieve@...s.st.com>
To: 'Linus Walleij' <linus.walleij@...aro.org>,
'Herbert Xu' <herbert@...dor.apana.org.au>,
"'David S. Miller'" <davem@...emloft.net>,
'Rob Herring' <robh+dt@...nel.org>,
'Krzysztof Kozlowski' <krzysztof.kozlowski+dt@...aro.org>,
'Maxime Coquelin' <mcoquelin.stm32@...il.com>,
'Alexandre Torgue' <alexandre.torgue@...s.st.com>
CC: <linux-crypto@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-stm32@...md-mailman.stormreply.com>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 2/7] crypto: stm32/hash: Simplify code
Hi Linus
Acked-by: Lionel Debieve <lionel.debieve@...s.st.com>
ST Restricted
-----Original Message-----
From: Linus Walleij <linus.walleij@...aro.org>
Sent: Wednesday, December 28, 2022 12:04 AM
To: Herbert Xu <herbert@...dor.apana.org.au>; David S. Miller <davem@...emloft.net>; Rob Herring <robh+dt@...nel.org>; Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>; Maxime Coquelin <mcoquelin.stm32@...il.com>; Alexandre Torgue <alexandre.torgue@...s.st.com>; Lionel Debieve <lionel.debieve@...s.st.com>
Cc: linux-crypto@...r.kernel.org; devicetree@...r.kernel.org; linux-stm32@...md-mailman.stormreply.com; linux-arm-kernel@...ts.infradead.org; linux-kernel@...r.kernel.org; Linus Walleij <linus.walleij@...aro.org>
Subject: [PATCH 2/7] crypto: stm32/hash: Simplify code
We are passing (rctx->flags & HASH_FLAGS_FINUP) as indicator for the final request but we already know this to be true since we are in the (final) arm of an if-statement set from the same flag. Just open-code it as true.
Signed-off-by: Linus Walleij <linus.walleij@...aro.org>
---
drivers/crypto/stm32/stm32-hash.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/crypto/stm32/stm32-hash.c b/drivers/crypto/stm32/stm32-hash.c
index d33006d43f76..0473ced7b4ea 100644
--- a/drivers/crypto/stm32/stm32-hash.c
+++ b/drivers/crypto/stm32/stm32-hash.c
@@ -399,8 +399,7 @@ static int stm32_hash_update_cpu(struct stm32_hash_dev *hdev)
if (final) {
bufcnt = rctx->bufcnt;
rctx->bufcnt = 0;
- err = stm32_hash_xmit_cpu(hdev, rctx->buffer, bufcnt,
- (rctx->flags & HASH_FLAGS_FINUP));
+ err = stm32_hash_xmit_cpu(hdev, rctx->buffer, bufcnt, 1);
}
return err;
--
2.38.1
Powered by blists - more mailing lists