mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] crypto: qce - drop redundant variable in qce_skcipher_done
@ 2026-07-20 23:27 Thorsten Blum
  2026-07-21  7:58 ` Bartosz Golaszewski
  2026-07-30  7:40 ` Herbert Xu
  0 siblings, 2 replies; 3+ messages in thread
From: Thorsten Blum @ 2026-07-20 23:27 UTC (permalink / raw)
  To: Bartosz Golaszewski, Herbert Xu, David S. Miller
  Cc: Thorsten Blum, linux-crypto, linux-arm-msm, linux-kernel

Remove the local ret variable and return the result directly.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 drivers/crypto/qce/skcipher.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/qce/skcipher.c b/drivers/crypto/qce/skcipher.c
index ffb334eb5b34..7e67d33fb48e 100644
--- a/drivers/crypto/qce/skcipher.c
+++ b/drivers/crypto/qce/skcipher.c
@@ -261,7 +261,6 @@ static int qce_skcipher_crypt(struct skcipher_request *req, int encrypt)
 	struct qce_alg_template *tmpl = to_cipher_tmpl(tfm);
 	unsigned int blocksize = crypto_skcipher_blocksize(tfm);
 	int keylen;
-	int ret;
 
 	rctx->flags = tmpl->alg_flags;
 	rctx->flags |= encrypt ? QCE_ENCRYPT : QCE_DECRYPT;
@@ -299,9 +298,8 @@ static int qce_skcipher_crypt(struct skcipher_request *req, int encrypt)
 					      req->base.data);
 		skcipher_request_set_crypt(&rctx->fallback_req, req->src,
 					   req->dst, req->cryptlen, req->iv);
-		ret = encrypt ? crypto_skcipher_encrypt(&rctx->fallback_req) :
-				crypto_skcipher_decrypt(&rctx->fallback_req);
-		return ret;
+		return encrypt ? crypto_skcipher_encrypt(&rctx->fallback_req) :
+				 crypto_skcipher_decrypt(&rctx->fallback_req);
 	}
 
 	return tmpl->qce->async_req_enqueue(tmpl->qce, &req->base);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] crypto: qce - drop redundant variable in qce_skcipher_done
  2026-07-20 23:27 [PATCH] crypto: qce - drop redundant variable in qce_skcipher_done Thorsten Blum
@ 2026-07-21  7:58 ` Bartosz Golaszewski
  2026-07-30  7:40 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2026-07-21  7:58 UTC (permalink / raw)
  To: Thorsten Blum
  Cc: linux-crypto, linux-arm-msm, linux-kernel, Bartosz Golaszewski,
	Herbert Xu, David S. Miller

On Tue, 21 Jul 2026 01:27:17 +0200, Thorsten Blum
<thorsten.blum@linux.dev> said:
> Remove the local ret variable and return the result directly.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---

Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] crypto: qce - drop redundant variable in qce_skcipher_done
  2026-07-20 23:27 [PATCH] crypto: qce - drop redundant variable in qce_skcipher_done Thorsten Blum
  2026-07-21  7:58 ` Bartosz Golaszewski
@ 2026-07-30  7:40 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2026-07-30  7:40 UTC (permalink / raw)
  To: Thorsten Blum
  Cc: Bartosz Golaszewski, David S. Miller, linux-crypto,
	linux-arm-msm, linux-kernel

On Tue, Jul 21, 2026 at 01:27:17AM +0200, Thorsten Blum wrote:
> Remove the local ret variable and return the result directly.
> 
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
>  drivers/crypto/qce/skcipher.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 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] 3+ messages in thread

end of thread, other threads:[~2026-07-30  7:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-20 23:27 [PATCH] crypto: qce - drop redundant variable in qce_skcipher_done Thorsten Blum
2026-07-21  7:58 ` Bartosz Golaszewski
2026-07-30  7:40 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®