[PATCH -next] soc: fsl: dpio: use list_move_tail instead of list_del/list_add_tail

From: Zou Wei
Date: Mon Jun 07 2021 - 20:32:00 EST


Using list_move_tail() instead of list_del() + list_add_tail().

Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
Signed-off-by: Zou Wei <zou_wei@xxxxxxxxxx>
---
drivers/soc/fsl/dpio/dpio-service.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/soc/fsl/dpio/dpio-service.c b/drivers/soc/fsl/dpio/dpio-service.c
index 7351f30..340c090 100644
--- a/drivers/soc/fsl/dpio/dpio-service.c
+++ b/drivers/soc/fsl/dpio/dpio-service.c
@@ -76,8 +76,7 @@ static inline struct dpaa2_io *service_select(struct dpaa2_io *d)

spin_lock(&dpio_list_lock);
d = list_entry(dpio_list.next, struct dpaa2_io, node);
- list_del(&d->node);
- list_add_tail(&d->node, &dpio_list);
+ list_move_tail(&d->node, &dpio_list);
spin_unlock(&dpio_list_lock);

return d;
--
2.6.2