* [PATCH] crypto: sl3516: remove redundant initializations of pointers in_sg and out_sg
@ 2022-01-30 23:05 Colin Ian King
2022-02-05 4:34 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2022-01-30 23:05 UTC (permalink / raw)
To: Corentin Labbe, Hans Ulli Kroll, Linus Walleij, Herbert Xu,
David S . Miller, linux-crypto, linux-arm-kernel
Cc: kernel-janitors, linux-kernel
Pointers in_sg and out_sg are being initialized with values that are
never read, they are being re-assigned the same values later on. The
initializations are redundant, remove them in preference to the later
assignments that are closer to when the pointers are being used.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/crypto/gemini/sl3516-ce-cipher.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/gemini/sl3516-ce-cipher.c b/drivers/crypto/gemini/sl3516-ce-cipher.c
index c1c2b1d86663..53e3fefb81de 100644
--- a/drivers/crypto/gemini/sl3516-ce-cipher.c
+++ b/drivers/crypto/gemini/sl3516-ce-cipher.c
@@ -23,8 +23,8 @@ static bool sl3516_ce_need_fallback(struct skcipher_request *areq)
struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
struct sl3516_ce_cipher_tfm_ctx *op = crypto_skcipher_ctx(tfm);
struct sl3516_ce_dev *ce = op->ce;
- struct scatterlist *in_sg = areq->src;
- struct scatterlist *out_sg = areq->dst;
+ struct scatterlist *in_sg;
+ struct scatterlist *out_sg;
struct scatterlist *sg;
if (areq->cryptlen == 0 || areq->cryptlen % 16) {
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] crypto: sl3516: remove redundant initializations of pointers in_sg and out_sg
2022-01-30 23:05 [PATCH] crypto: sl3516: remove redundant initializations of pointers in_sg and out_sg Colin Ian King
@ 2022-02-05 4:34 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2022-02-05 4:34 UTC (permalink / raw)
To: Colin Ian King
Cc: Corentin Labbe, Hans Ulli Kroll, Linus Walleij, David S . Miller,
linux-crypto, linux-arm-kernel, kernel-janitors, linux-kernel
On Sun, Jan 30, 2022 at 11:05:15PM +0000, Colin Ian King wrote:
> Pointers in_sg and out_sg are being initialized with values that are
> never read, they are being re-assigned the same values later on. The
> initializations are redundant, remove them in preference to the later
> assignments that are closer to when the pointers are being used.
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
> drivers/crypto/gemini/sl3516-ce-cipher.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 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] 2+ messages in thread
end of thread, other threads:[~2022-02-05 4:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-30 23:05 [PATCH] crypto: sl3516: remove redundant initializations of pointers in_sg and out_sg Colin Ian King
2022-02-05 4:34 ` 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).