* [PATCH linux-next] crypto: ccp: Remove the unneeded result variable
@ 2022-09-20 6:32 cgel.zte
2022-09-20 19:09 ` John Allen
2022-09-30 6:15 ` Herbert Xu
0 siblings, 2 replies; 3+ messages in thread
From: cgel.zte @ 2022-09-20 6:32 UTC (permalink / raw)
To: herbert
Cc: thomas.lendacky, john.allen, davem, linux-crypto, linux-kernel,
ye xingchen, Zeal Robot
From: ye xingchen <ye.xingchen@zte.com.cn>
Return the value ccp_crypto_enqueue_request() directly instead of storing
it in another redundant variable.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
drivers/crypto/ccp/ccp-crypto-des3.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/crypto/ccp/ccp-crypto-des3.c b/drivers/crypto/ccp/ccp-crypto-des3.c
index ec97daf0fcb7..278636ed251a 100644
--- a/drivers/crypto/ccp/ccp-crypto-des3.c
+++ b/drivers/crypto/ccp/ccp-crypto-des3.c
@@ -64,7 +64,6 @@ static int ccp_des3_crypt(struct skcipher_request *req, bool encrypt)
struct ccp_des3_req_ctx *rctx = skcipher_request_ctx(req);
struct scatterlist *iv_sg = NULL;
unsigned int iv_len = 0;
- int ret;
if (!ctx->u.des3.key_len)
return -EINVAL;
@@ -100,9 +99,7 @@ static int ccp_des3_crypt(struct skcipher_request *req, bool encrypt)
rctx->cmd.u.des3.src_len = req->cryptlen;
rctx->cmd.u.des3.dst = req->dst;
- ret = ccp_crypto_enqueue_request(&req->base, &rctx->cmd);
-
- return ret;
+ return ccp_crypto_enqueue_request(&req->base, &rctx->cmd);
}
static int ccp_des3_encrypt(struct skcipher_request *req)
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH linux-next] crypto: ccp: Remove the unneeded result variable
2022-09-20 6:32 [PATCH linux-next] crypto: ccp: Remove the unneeded result variable cgel.zte
@ 2022-09-20 19:09 ` John Allen
2022-09-30 6:15 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: John Allen @ 2022-09-20 19:09 UTC (permalink / raw)
To: cgel.zte, herbert
Cc: thomas.lendacky, davem, linux-crypto, linux-kernel, ye xingchen,
Zeal Robot
On 9/20/22 1:32 AM, cgel.zte@gmail.com wrote:
> From: ye xingchen <ye.xingchen@zte.com.cn>
>
> Return the value ccp_crypto_enqueue_request() directly instead of storing
> it in another redundant variable.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
> ---
> drivers/crypto/ccp/ccp-crypto-des3.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/crypto/ccp/ccp-crypto-des3.c b/drivers/crypto/ccp/ccp-crypto-des3.c
> index ec97daf0fcb7..278636ed251a 100644
> --- a/drivers/crypto/ccp/ccp-crypto-des3.c
> +++ b/drivers/crypto/ccp/ccp-crypto-des3.c
> @@ -64,7 +64,6 @@ static int ccp_des3_crypt(struct skcipher_request *req, bool encrypt)
> struct ccp_des3_req_ctx *rctx = skcipher_request_ctx(req);
> struct scatterlist *iv_sg = NULL;
> unsigned int iv_len = 0;
> - int ret;
>
> if (!ctx->u.des3.key_len)
> return -EINVAL;
> @@ -100,9 +99,7 @@ static int ccp_des3_crypt(struct skcipher_request *req, bool encrypt)
> rctx->cmd.u.des3.src_len = req->cryptlen;
> rctx->cmd.u.des3.dst = req->dst;
>
> - ret = ccp_crypto_enqueue_request(&req->base, &rctx->cmd);
> -
> - return ret;
> + return ccp_crypto_enqueue_request(&req->base, &rctx->cmd);
> }
>
> static int ccp_des3_encrypt(struct skcipher_request *req)
Acked-by: John Allen <john.allen@amd.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH linux-next] crypto: ccp: Remove the unneeded result variable
2022-09-20 6:32 [PATCH linux-next] crypto: ccp: Remove the unneeded result variable cgel.zte
2022-09-20 19:09 ` John Allen
@ 2022-09-30 6:15 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2022-09-30 6:15 UTC (permalink / raw)
To: cgel.zte
Cc: thomas.lendacky, john.allen, davem, linux-crypto, linux-kernel,
ye xingchen, Zeal Robot
On Tue, Sep 20, 2022 at 06:32:52AM +0000, cgel.zte@gmail.com wrote:
> From: ye xingchen <ye.xingchen@zte.com.cn>
>
> Return the value ccp_crypto_enqueue_request() directly instead of storing
> it in another redundant variable.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
> ---
> drivers/crypto/ccp/ccp-crypto-des3.c | 5 +----
> 1 file changed, 1 insertion(+), 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:[~2022-09-30 6:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-20 6:32 [PATCH linux-next] crypto: ccp: Remove the unneeded result variable cgel.zte
2022-09-20 19:09 ` John Allen
2022-09-30 6:15 ` 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®