2021-06-09 13:28:27

by Baokun Li

[permalink] [raw]
Subject: [PATCH -next v2] crypto: ccp - Use list_move_tail instead of list_del/list_add_tail in ccp-dmaengine.c

Using list_move_tail() instead of list_del() + list_add_tail() in ccp-dmaengine.c.

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Baokun Li <[email protected]>
---
V1->V2:
CC mailist

drivers/crypto/ccp/ccp-dmaengine.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/crypto/ccp/ccp-dmaengine.c b/drivers/crypto/ccp/ccp-dmaengine.c
index 0770a83bf1a5..d718db224be4 100644
--- a/drivers/crypto/ccp/ccp-dmaengine.c
+++ b/drivers/crypto/ccp/ccp-dmaengine.c
@@ -307,8 +307,7 @@ static dma_cookie_t ccp_tx_submit(struct dma_async_tx_descriptor *tx_desc)
spin_lock_irqsave(&chan->lock, flags);

cookie = dma_cookie_assign(tx_desc);
- list_del(&desc->entry);
- list_add_tail(&desc->entry, &chan->pending);
+ list_move_tail(&desc->entry, &chan->pending);

spin_unlock_irqrestore(&chan->lock, flags);



2021-06-17 08:01:38

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH -next v2] crypto: ccp - Use list_move_tail instead of list_del/list_add_tail in ccp-dmaengine.c

On Wed, Jun 09, 2021 at 03:15:26PM +0800, Baokun Li wrote:
> Using list_move_tail() instead of list_del() + list_add_tail() in ccp-dmaengine.c.
>
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: Baokun Li <[email protected]>
> ---
> V1->V2:
> CC mailist
>
> drivers/crypto/ccp/ccp-dmaengine.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)

Patch applied. Thanks.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt