Linux-Crypto Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH -next] crypto: xilinx - Remove set but not used variable 'drv_ctx'
@ 2020-05-05 10:12 YueHaibing
  2020-05-15  6:15 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2020-05-05 10:12 UTC (permalink / raw)
  To: Herbert Xu, Michal Simek, Greg Kroah-Hartman, Rajan Vaja,
	Kalyani Akula, Jolly Shah
  Cc: YueHaibing, linux-crypto, linux-arm-kernel, kernel-janitors, Hulk Robot

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/crypto/xilinx/zynqmp-aes-gcm.c: In function 'zynqmp_aes_aead_cipher':
drivers/crypto/xilinx/zynqmp-aes-gcm.c:83:30: warning:
 variable 'drv_ctx' set but not used [-Wunused-but-set-variable]

commit bc86f9c54616 ("firmware: xilinx: Remove eemi ops for aes engine") left
behind this, remove it.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/crypto/xilinx/zynqmp-aes-gcm.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/crypto/xilinx/zynqmp-aes-gcm.c b/drivers/crypto/xilinx/zynqmp-aes-gcm.c
index d0a0daf3ea08..9a342932b7f3 100644
--- a/drivers/crypto/xilinx/zynqmp-aes-gcm.c
+++ b/drivers/crypto/xilinx/zynqmp-aes-gcm.c
@@ -79,8 +79,6 @@ static int zynqmp_aes_aead_cipher(struct aead_request *req)
 	struct zynqmp_aead_tfm_ctx *tfm_ctx = crypto_aead_ctx(aead);
 	struct zynqmp_aead_req_ctx *rq_ctx = aead_request_ctx(req);
 	struct device *dev = tfm_ctx->dev;
-	struct aead_alg *alg = crypto_aead_alg(aead);
-	struct zynqmp_aead_drv_ctx *drv_ctx;
 	struct zynqmp_aead_hw_req *hwreq;
 	dma_addr_t dma_addr_data, dma_addr_hw_req;
 	unsigned int data_size;
@@ -89,8 +87,6 @@ static int zynqmp_aes_aead_cipher(struct aead_request *req)
 	char *kbuf;
 	int err;
 
-	drv_ctx = container_of(alg, struct zynqmp_aead_drv_ctx, alg.aead);
-
 	if (tfm_ctx->keysrc == ZYNQMP_AES_KUP_KEY)
 		dma_size = req->cryptlen + ZYNQMP_AES_KEY_SIZE
 			   + GCM_AES_IV_SIZE;




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

* Re: [PATCH -next] crypto: xilinx - Remove set but not used variable 'drv_ctx'
  2020-05-05 10:12 [PATCH -next] crypto: xilinx - Remove set but not used variable 'drv_ctx' YueHaibing
@ 2020-05-15  6:15 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2020-05-15  6:15 UTC (permalink / raw)
  To: YueHaibing
  Cc: michal.simek, gregkh, rajan.vaja, kalyani.akula, jolly.shah,
	yuehaibing, linux-crypto, linux-arm-kernel, kernel-janitors,
	hulkci

YueHaibing <yuehaibing@huawei.com> wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/crypto/xilinx/zynqmp-aes-gcm.c: In function 'zynqmp_aes_aead_cipher':
> drivers/crypto/xilinx/zynqmp-aes-gcm.c:83:30: warning:
> variable 'drv_ctx' set but not used [-Wunused-but-set-variable]
> 
> commit bc86f9c54616 ("firmware: xilinx: Remove eemi ops for aes engine") left
> behind this, remove it.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/crypto/xilinx/zynqmp-aes-gcm.c | 4 ----
> 1 file changed, 4 deletions(-)

This patch doesn't apply to the current cryptodev tree.
-- 
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, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-05 10:12 [PATCH -next] crypto: xilinx - Remove set but not used variable 'drv_ctx' YueHaibing
2020-05-15  6:15 ` Herbert Xu

Linux-Crypto Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-crypto/0 linux-crypto/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-crypto linux-crypto/ https://lore.kernel.org/linux-crypto \
		linux-crypto@vger.kernel.org
	public-inbox-index linux-crypto

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-crypto


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git