Skip to content

Commit

Permalink
USB: FHCI: use list_move_tail instead of list_del/list_add_tail
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Greg Kroah-Hartman committed Sep 5, 2012
1 parent 49b5582 commit 027c521
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/usb/host/fhci-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,7 @@ static void move_head_to_tail(struct list_head *list)
struct list_head *node = list->next;

if (!list_empty(list)) {
list_del(node);
list_add_tail(node, list);
list_move_tail(node, list);
}
}

Expand Down

0 comments on commit 027c521

Please sign in to comment.