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

usb: renesas_usbhs: (cosmetic) simplify list operations

list.h already provide helpers to find the first entry and to move list
nodes to the tail of another list. This patch simply uses those helpers,
no functional changes.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>

authored by

Guennadi Liakhovetski and committed by
Felipe Balbi
d5261286 6fecfb05

+2 -3
+2 -3
drivers/usb/renesas_usbhs/fifo.c
··· 76 76 pipe->handler = &usbhsf_null_handler; 77 77 } 78 78 79 - list_del_init(&pkt->node); 80 - list_add_tail(&pkt->node, &pipe->list); 79 + list_move_tail(&pkt->node, &pipe->list); 81 80 82 81 /* 83 82 * each pkt must hold own handler. ··· 106 107 if (list_empty(&pipe->list)) 107 108 return NULL; 108 109 109 - return list_entry(pipe->list.next, struct usbhs_pkt, node); 110 + return list_first_entry(&pipe->list, struct usbhs_pkt, node); 110 111 } 111 112 112 113 struct usbhs_pkt *usbhs_pkt_pop(struct usbhs_pipe *pipe, struct usbhs_pkt *pkt)