crypto: ccp - Use list_move_tail instead of list_del/list_add_tail in ccp-dmaengine.c
authorBaokun Li <libaokun1@huawei.com>
Wed, 9 Jun 2021 07:15:26 +0000 (15:15 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 17 Jun 2021 07:07:30 +0000 (15:07 +0800)
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>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccp/ccp-dmaengine.c

index 0770a83..d718db2 100644 (file)
@@ -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);