Browse Source

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>
Wei Yongjun 13 years ago
parent
commit
027c5215a9
1 changed files with 1 additions and 2 deletions
  1. 1 2
      drivers/usb/host/fhci-sched.c

+ 1 - 2
drivers/usb/host/fhci-sched.c

@@ -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);
 	}
 }