Messages in this thread Patch in this message | | | From | Ken Helias <> | Subject | [PATCH 10/13] xhci: Use list_add_(before|after) macros | Date | Fri, 6 Jun 2014 19:34:29 +0200 |
| |
From: Ken Helias <kenhelias@firemail.de>
Many places in the code uses list_add_tail/list_add to insert an entry before/after another entry. This confuses the reader because these are usually used to add an item to a list_head and not an entry. Better use the self explaining function name.
Signed-off-by: Ken Helias <kenhelias@firemail.de> Cc: linux-usb@vger.kernel.org --- drivers/usb/host/xhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 2b8d9a2..4f4b702 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -2471,7 +2471,7 @@ static void xhci_add_ep_to_interval_table(struct xhci_hcd *xhci, if (ep_bw->max_packet_size >= smaller_ep->bw_info.max_packet_size) { /* Add the new ep before the smaller endpoint */ - list_add_tail(&virt_ep->bw_endpoint_list, + list_add_before(&virt_ep->bw_endpoint_list, &smaller_ep->bw_endpoint_list); return; } -- 2.0.0
| |