diff mbox series

[-next] crypto: remove set but not used variable 'fini'

Message ID 20190410024742.2103-1-yuehaibing@huawei.com (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show
Series [-next] crypto: remove set but not used variable 'fini' | expand

Commit Message

Yue Haibing April 10, 2019, 2:47 a.m. UTC
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/crypto/mxs-dcp.c: In function 'dcp_chan_thread_sha':
drivers/crypto/mxs-dcp.c:707:11: warning:
 variable 'fini' set but not used [-Wunused-but-set-variable]

It's not used since commit d80771c08363 ("crypto: mxs-dcp - Fix wait
logic on chan threads"),so can be removed.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/crypto/mxs-dcp.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

Comments

Herbert Xu April 18, 2019, 2:23 p.m. UTC | #1
On Wed, Apr 10, 2019 at 02:47:42AM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/crypto/mxs-dcp.c: In function 'dcp_chan_thread_sha':
> drivers/crypto/mxs-dcp.c:707:11: warning:
>  variable 'fini' set but not used [-Wunused-but-set-variable]
> 
> It's not used since commit d80771c08363 ("crypto: mxs-dcp - Fix wait
> logic on chan threads"),so can be removed.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/crypto/mxs-dcp.c | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)

Patch applied.  Thanks.
diff mbox series

Patch

diff --git a/drivers/crypto/mxs-dcp.c b/drivers/crypto/mxs-dcp.c
index 494cfc4272f3..b4429891e368 100644
--- a/drivers/crypto/mxs-dcp.c
+++ b/drivers/crypto/mxs-dcp.c
@@ -700,11 +700,7 @@  static int dcp_chan_thread_sha(void *data)
 
 	struct crypto_async_request *backlog;
 	struct crypto_async_request *arq;
-
-	struct dcp_sha_req_ctx *rctx;
-
-	struct ahash_request *req;
-	int ret, fini;
+	int ret;
 
 	while (!kthread_should_stop()) {
 		set_current_state(TASK_INTERRUPTIBLE);
@@ -725,11 +721,7 @@  static int dcp_chan_thread_sha(void *data)
 			backlog->complete(backlog, -EINPROGRESS);
 
 		if (arq) {
-			req = ahash_request_cast(arq);
-			rctx = ahash_request_ctx(req);
-
 			ret = dcp_sha_req_to_buf(arq);
-			fini = rctx->fini;
 			arq->complete(arq, ret);
 		}
 	}