* [PATCH] crypto: ux500: Remove set but not used variable 'cookie'
@ 2019-10-11 10:08 zhengbin
2019-10-18 8:04 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: zhengbin @ 2019-10-11 10:08 UTC (permalink / raw)
To: herbert, davem, ndesaulniers, linux-crypto; +Cc: zhengbin13
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/crypto/ux500/hash/hash_core.c: In function hash_set_dma_transfer:
drivers/crypto/ux500/hash/hash_core.c:143:15: warning: variable cookie set but not used [-Wunused-but-set-variable]
It is not used since commit 8a63b1994c50 ("crypto:
ux500 - Add driver for HASH hardware")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
drivers/crypto/ux500/hash/hash_core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/crypto/ux500/hash/hash_core.c b/drivers/crypto/ux500/hash/hash_core.c
index c172a69..c24f2db 100644
--- a/drivers/crypto/ux500/hash/hash_core.c
+++ b/drivers/crypto/ux500/hash/hash_core.c
@@ -140,7 +140,6 @@ static int hash_set_dma_transfer(struct hash_ctx *ctx, struct scatterlist *sg,
{
struct dma_async_tx_descriptor *desc = NULL;
struct dma_chan *channel = NULL;
- dma_cookie_t cookie;
if (direction != DMA_TO_DEVICE) {
dev_err(ctx->device->dev, "%s: Invalid DMA direction\n",
@@ -176,7 +175,7 @@ static int hash_set_dma_transfer(struct hash_ctx *ctx, struct scatterlist *sg,
desc->callback = hash_dma_callback;
desc->callback_param = ctx;
- cookie = dmaengine_submit(desc);
+ dmaengine_submit(desc);
dma_async_issue_pending(channel);
return 0;
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] crypto: ux500: Remove set but not used variable 'cookie'
2019-10-11 10:08 [PATCH] crypto: ux500: Remove set but not used variable 'cookie' zhengbin
@ 2019-10-18 8:04 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2019-10-18 8:04 UTC (permalink / raw)
To: zhengbin; +Cc: davem, ndesaulniers, linux-crypto
On Fri, Oct 11, 2019 at 06:08:02PM +0800, zhengbin wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/crypto/ux500/hash/hash_core.c: In function hash_set_dma_transfer:
> drivers/crypto/ux500/hash/hash_core.c:143:15: warning: variable cookie set but not used [-Wunused-but-set-variable]
>
> It is not used since commit 8a63b1994c50 ("crypto:
> ux500 - Add driver for HASH hardware")
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: zhengbin <zhengbin13@huawei.com>
> ---
> drivers/crypto/ux500/hash/hash_core.c | 3 +--
> 1 file changed, 1 insertion(+), 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:[~2019-10-18 8:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-11 10:08 [PATCH] crypto: ux500: Remove set but not used variable 'cookie' zhengbin
2019-10-18 8:04 ` 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).