Commit 027c5215 authored by Wei Yongjun's avatar Wei Yongjun Committed by Greg Kroah-Hartman

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 49b55828
...@@ -261,8 +261,7 @@ static void move_head_to_tail(struct list_head *list) ...@@ -261,8 +261,7 @@ static void move_head_to_tail(struct list_head *list)
struct list_head *node = list->next; struct list_head *node = list->next;
if (!list_empty(list)) { if (!list_empty(list)) {
list_del(node); list_move_tail(node, list);
list_add_tail(node, list);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment