* [PATCH] crypto: hisilicon: remove redundant assignment of pointer ctx
@ 2020-02-22 14:24 Colin King
2020-02-24 1:14 ` Xu Zaibo
2020-02-28 0:53 ` Herbert Xu
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2020-02-22 14:24 UTC (permalink / raw)
To: Zaibo Xu, Herbert Xu, David S . Miller, linux-crypto
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Pointer ctx is being re-assigned with the same value as it
was initialized with. The second assignment is redundant and
can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/crypto/hisilicon/sec2/sec_crypto.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/crypto/hisilicon/sec2/sec_crypto.c b/drivers/crypto/hisilicon/sec2/sec_crypto.c
index a2cfcc9ccd94..acd15507eb8a 100644
--- a/drivers/crypto/hisilicon/sec2/sec_crypto.c
+++ b/drivers/crypto/hisilicon/sec2/sec_crypto.c
@@ -447,7 +447,6 @@ static int sec_skcipher_init(struct crypto_skcipher *tfm)
struct sec_ctx *ctx = crypto_skcipher_ctx(tfm);
int ret;
- ctx = crypto_skcipher_ctx(tfm);
ctx->alg_type = SEC_SKCIPHER;
crypto_skcipher_set_reqsize(tfm, sizeof(struct sec_req));
ctx->c_ctx.ivsize = crypto_skcipher_ivsize(tfm);
--
2.25.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] crypto: hisilicon: remove redundant assignment of pointer ctx
2020-02-22 14:24 [PATCH] crypto: hisilicon: remove redundant assignment of pointer ctx Colin King
@ 2020-02-24 1:14 ` Xu Zaibo
2020-02-28 0:53 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Xu Zaibo @ 2020-02-24 1:14 UTC (permalink / raw)
To: Colin King, Herbert Xu, David S . Miller, linux-crypto
Cc: kernel-janitors, linux-kernel
Yes, thank you!
On 2020/2/22 22:24, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Pointer ctx is being re-assigned with the same value as it
> was initialized with. The second assignment is redundant and
> can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/crypto/hisilicon/sec2/sec_crypto.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/crypto/hisilicon/sec2/sec_crypto.c b/drivers/crypto/hisilicon/sec2/sec_crypto.c
> index a2cfcc9ccd94..acd15507eb8a 100644
> --- a/drivers/crypto/hisilicon/sec2/sec_crypto.c
> +++ b/drivers/crypto/hisilicon/sec2/sec_crypto.c
> @@ -447,7 +447,6 @@ static int sec_skcipher_init(struct crypto_skcipher *tfm)
> struct sec_ctx *ctx = crypto_skcipher_ctx(tfm);
> int ret;
>
> - ctx = crypto_skcipher_ctx(tfm);
> ctx->alg_type = SEC_SKCIPHER;
> crypto_skcipher_set_reqsize(tfm, sizeof(struct sec_req));
> ctx->c_ctx.ivsize = crypto_skcipher_ivsize(tfm);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] crypto: hisilicon: remove redundant assignment of pointer ctx
2020-02-22 14:24 [PATCH] crypto: hisilicon: remove redundant assignment of pointer ctx Colin King
2020-02-24 1:14 ` Xu Zaibo
@ 2020-02-28 0:53 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2020-02-28 0:53 UTC (permalink / raw)
To: Colin King
Cc: Zaibo Xu, David S . Miller, linux-crypto, kernel-janitors, linux-kernel
On Sat, Feb 22, 2020 at 02:24:09PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Pointer ctx is being re-assigned with the same value as it
> was initialized with. The second assignment is redundant and
> can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/crypto/hisilicon/sec2/sec_crypto.c | 1 -
> 1 file changed, 1 deletion(-)
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:[~2020-02-28 0:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-22 14:24 [PATCH] crypto: hisilicon: remove redundant assignment of pointer ctx Colin King
2020-02-24 1:14 ` Xu Zaibo
2020-02-28 0:53 ` Herbert Xu
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).