Skip to content

Commit 027c521

Browse files
Wei Yongjungregkh
authored andcommitted
USB: FHCI: use list_move_tail instead of list_del/list_add_tail
Using list_move_tail() instead of list_del() + list_add_tail(). spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 49b5582 commit 027c521

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/usb/host/fhci-sched.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,7 @@ static void move_head_to_tail(struct list_head *list)
261261
struct list_head *node = list->next;
262262

263263
if (!list_empty(list)) {
264-
list_del(node);
265-
list_add_tail(node, list);
264+
list_move_tail(node, list);
266265
}
267266
}
268267

0 commit comments

Comments
 (0)