forked from luck/tmp_suning_uos_patched
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>
This commit is contained in:
parent
49b5582893
commit
027c5215a9
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user