lkml.org 
[lkml]   [2021]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH -next] dmaengine: sun4i: Use list_move_tail instead of list_del/list_add_tail
    Date
    Using list_move_tail() instead of list_del() + list_add_tail().

    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Zou Wei <zou_wei@huawei.com>
    ---
    drivers/dma/sun4i-dma.c | 5 ++---
    1 file changed, 2 insertions(+), 3 deletions(-)

    diff --git a/drivers/dma/sun4i-dma.c b/drivers/dma/sun4i-dma.c
    index e8b6633..93f1645 100644
    --- a/drivers/dma/sun4i-dma.c
    +++ b/drivers/dma/sun4i-dma.c
    @@ -1042,9 +1042,8 @@ static irqreturn_t sun4i_dma_interrupt(int irq, void *dev_id)
    * Move the promise into the completed list now that
    * we're done with it
    */
    - list_del(&vchan->processing->list);
    - list_add_tail(&vchan->processing->list,
    - &contract->completed_demands);
    + list_move_tail(&vchan->processing->list,
    + &contract->completed_demands);

    /*
    * Cyclic DMA transfers are special:
    --
    2.6.2
    \
     
     \ /
      Last update: 2021-06-07 05:03    [W:2.758 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site