Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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);
	}
}