diff mbox series

[-next,v2] crypto: ccp - Use list_move_tail instead of list_del/list_add_tail in ccp-dmaengine.c

Message ID 20210609071526.1338089-1-libaokun1@huawei.com
State Accepted
Commit 87c8ba5cd7f99b1c05589c455703f54e92f43ed0
Headers show
Series [-next,v2] crypto: ccp - Use list_move_tail instead of list_del/list_add_tail in ccp-dmaengine.c | expand

Commit Message

libaokun (A) June 9, 2021, 7:15 a.m. UTC
Using list_move_tail() instead of list_del() + list_add_tail() in ccp-dmaengine.c.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
---
V1->V2:
	CC mailist

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

Comments

Herbert Xu June 17, 2021, 8 a.m. UTC | #1
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 <hulkci@huawei.com>

> Signed-off-by: Baokun Li <libaokun1@huawei.com>

> ---

> V1->V2:

> 	CC mailist

> 

>  drivers/crypto/ccp/ccp-dmaengine.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
diff mbox series

Patch

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);