diff mbox series

[-next] crypto: chelsio - CHECK-remove set but not used variables 'adap'

Message ID 1545979302-111921-1-git-send-email-yuehaibing@huawei.com (mailing list archive)
State Superseded
Delegated to: Herbert Xu
Headers show
Series [-next] crypto: chelsio - CHECK-remove set but not used variables 'adap' | expand

Commit Message

Yue Haibing Dec. 28, 2018, 6:41 a.m. UTC
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/crypto/chelsio/chcr_algo.c: In function 'chcr_device_init':
drivers/crypto/chelsio/chcr_algo.c:1371:18: warning:
 variable 'adap' set but not used [-Wunused-but-set-variable]

It not used since commit a1c6fd4308d3 ("crypto: chelsio - Update ntx queue
received from cxgb4")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/crypto/chelsio/chcr_algo.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Yue Haibing Dec. 28, 2018, 6:43 a.m. UTC | #1
Sorry, Pls ignore this, the title need respin.

On 2018/12/28 14:41, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/crypto/chelsio/chcr_algo.c: In function 'chcr_device_init':
> drivers/crypto/chelsio/chcr_algo.c:1371:18: warning:
>  variable 'adap' set but not used [-Wunused-but-set-variable]
> 
> It not used since commit a1c6fd4308d3 ("crypto: chelsio - Update ntx queue
> received from cxgb4")
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/crypto/chelsio/chcr_algo.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/crypto/chelsio/chcr_algo.c b/drivers/crypto/chelsio/chcr_algo.c
> index bcef765..c8cd2d3 100644
> --- a/drivers/crypto/chelsio/chcr_algo.c
> +++ b/drivers/crypto/chelsio/chcr_algo.c
> @@ -1368,7 +1368,6 @@ static int chcr_aes_decrypt(struct ablkcipher_request *req)
>  static int chcr_device_init(struct chcr_context *ctx)
>  {
>  	struct uld_ctx *u_ctx = NULL;
> -	struct adapter *adap;
>  	unsigned int id;
>  	int txq_perchan, txq_idx, ntxq;
>  	int err = 0, rxq_perchan, rxq_idx;
> @@ -1382,7 +1381,6 @@ static int chcr_device_init(struct chcr_context *ctx)
>  			goto out;
>  		}
>  		ctx->dev = &u_ctx->dev;
> -		adap = padap(ctx->dev);
>  		ntxq = u_ctx->lldi.ntxq;
>  		rxq_perchan = u_ctx->lldi.nrxq / u_ctx->lldi.nchan;
>  		txq_perchan = ntxq / u_ctx->lldi.nchan;
> 
> 
> 
> 
> .
>
diff mbox series

Patch

diff --git a/drivers/crypto/chelsio/chcr_algo.c b/drivers/crypto/chelsio/chcr_algo.c
index bcef765..c8cd2d3 100644
--- a/drivers/crypto/chelsio/chcr_algo.c
+++ b/drivers/crypto/chelsio/chcr_algo.c
@@ -1368,7 +1368,6 @@  static int chcr_aes_decrypt(struct ablkcipher_request *req)
 static int chcr_device_init(struct chcr_context *ctx)
 {
 	struct uld_ctx *u_ctx = NULL;
-	struct adapter *adap;
 	unsigned int id;
 	int txq_perchan, txq_idx, ntxq;
 	int err = 0, rxq_perchan, rxq_idx;
@@ -1382,7 +1381,6 @@  static int chcr_device_init(struct chcr_context *ctx)
 			goto out;
 		}
 		ctx->dev = &u_ctx->dev;
-		adap = padap(ctx->dev);
 		ntxq = u_ctx->lldi.ntxq;
 		rxq_perchan = u_ctx->lldi.nrxq / u_ctx->lldi.nchan;
 		txq_perchan = ntxq / u_ctx->lldi.nchan;