linux-sunxi.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] dmaengine: sun4i: Use list_move_tail instead of list_del/list_add_tail
@ 2021-06-07  3:20 Zou Wei
  2021-06-07  8:41 ` Maxime Ripard
  2021-06-07 11:36 ` Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: Zou Wei @ 2021-06-07  3:20 UTC (permalink / raw)
  To: vkoul, mripard, wens, jernej.skrabec
  Cc: dmaengine, linux-arm-kernel, linux-sunxi, linux-kernel, Zou Wei

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] dmaengine: sun4i: Use list_move_tail instead of list_del/list_add_tail
  2021-06-07  3:20 [PATCH -next] dmaengine: sun4i: Use list_move_tail instead of list_del/list_add_tail Zou Wei
@ 2021-06-07  8:41 ` Maxime Ripard
  2021-06-07 11:36 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Ripard @ 2021-06-07  8:41 UTC (permalink / raw)
  To: Zou Wei
  Cc: vkoul, wens, jernej.skrabec, dmaengine, linux-arm-kernel,
	linux-sunxi, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 289 bytes --]

On Mon, Jun 07, 2021 at 11:20:35AM +0800, Zou Wei wrote:
> 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>

Acked-by: Maxime Ripard <maxime@cerno.tech>

Thanks!
Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] dmaengine: sun4i: Use list_move_tail instead of list_del/list_add_tail
  2021-06-07  3:20 [PATCH -next] dmaengine: sun4i: Use list_move_tail instead of list_del/list_add_tail Zou Wei
  2021-06-07  8:41 ` Maxime Ripard
@ 2021-06-07 11:36 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2021-06-07 11:36 UTC (permalink / raw)
  To: Zou Wei
  Cc: mripard, wens, jernej.skrabec, dmaengine, linux-arm-kernel,
	linux-sunxi, linux-kernel

On 07-06-21, 11:20, Zou Wei wrote:
> Using list_move_tail() instead of list_del() + list_add_tail().

Applied, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-07 11:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-07  3:20 [PATCH -next] dmaengine: sun4i: Use list_move_tail instead of list_del/list_add_tail Zou Wei
2021-06-07  8:41 ` Maxime Ripard
2021-06-07 11:36 ` Vinod Koul

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