Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: WUSBCORE: use list_move_tail instead of list_del/list_add_tail

Using list_move_tail() instead of list_del() + list_add_tail().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Wei Yongjun and committed by
Greg Kroah-Hartman
8eb41299 7868943d

+2 -4
+2 -4
drivers/usb/wusbcore/wa-xfer.c
··· 1552 1552 1553 1553 dev_info(dev, "Control EP stall. Queue delayed work.\n"); 1554 1554 spin_lock_irq(&wa->xfer_list_lock); 1555 - /* remove xfer from xfer_list. */ 1556 - list_del(&xfer->list_node); 1557 - /* add xfer to xfer_errored_list. */ 1558 - list_add_tail(&xfer->list_node, &wa->xfer_errored_list); 1555 + /* move xfer from xfer_list to xfer_errored_list. */ 1556 + list_move_tail(&xfer->list_node, &wa->xfer_errored_list); 1559 1557 spin_unlock_irq(&wa->xfer_list_lock); 1560 1558 spin_unlock_irqrestore(&xfer->lock, flags); 1561 1559 queue_work(wusbd, &wa->xfer_error_work);