提交 69defe04 编写于 作者: M Mathias Nyman 提交者: Greg Kroah-Hartman

xhci: cleanup finish_td function

Remove unnecessary else after return, dropping extra indentation depth.
No functional changes.
Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 c00552eb
...@@ -1813,15 +1813,14 @@ static int finish_td(struct xhci_hcd *xhci, struct xhci_td *td, ...@@ -1813,15 +1813,14 @@ static int finish_td(struct xhci_hcd *xhci, struct xhci_td *td,
if (skip) if (skip)
goto td_cleanup; goto td_cleanup;
if (trb_comp_code == COMP_STOP_INVAL || if (trb_comp_code == COMP_STOP_INVAL || trb_comp_code == COMP_STOP) {
trb_comp_code == COMP_STOP) {
/* The Endpoint Stop Command completion will take care of any /* The Endpoint Stop Command completion will take care of any
* stopped TDs. A stopped TD may be restarted, so don't update * stopped TDs. A stopped TD may be restarted, so don't update
* the ring dequeue pointer or take this TD off any lists yet. * the ring dequeue pointer or take this TD off any lists yet.
*/ */
ep->stopped_td = td; ep->stopped_td = td;
return 0; return 0;
} else { }
if (trb_comp_code == COMP_STALL || if (trb_comp_code == COMP_STALL ||
xhci_requires_manual_halt_cleanup(xhci, ep_ctx, xhci_requires_manual_halt_cleanup(xhci, ep_ctx,
trb_comp_code)) { trb_comp_code)) {
...@@ -1830,9 +1829,8 @@ static int finish_td(struct xhci_hcd *xhci, struct xhci_td *td, ...@@ -1830,9 +1829,8 @@ static int finish_td(struct xhci_hcd *xhci, struct xhci_td *td,
* dequeue pointer past the TD. * dequeue pointer past the TD.
* The class driver clears the device side halt later. * The class driver clears the device side halt later.
*/ */
xhci_cleanup_halted_endpoint(xhci, xhci_cleanup_halted_endpoint(xhci, slot_id, ep_index,
slot_id, ep_index, ep_ring->stream_id, ep_ring->stream_id, td, event_trb);
td, event_trb);
} else { } else {
/* Update ring dequeue pointer */ /* Update ring dequeue pointer */
while (ep_ring->dequeue != td->last_trb) while (ep_ring->dequeue != td->last_trb)
...@@ -1846,15 +1844,12 @@ static int finish_td(struct xhci_hcd *xhci, struct xhci_td *td, ...@@ -1846,15 +1844,12 @@ static int finish_td(struct xhci_hcd *xhci, struct xhci_td *td,
urb_priv = urb->hcpriv; urb_priv = urb->hcpriv;
/* Do one last check of the actual transfer length. /* Do one last check of the actual transfer length.
* If the host controller said we transferred more data than * If the host controller said we transferred more data than the buffer
* the buffer length, urb->actual_length will be a very big * length, urb->actual_length will be a very big number (since it's
* number (since it's unsigned). Play it safe and say we didn't * unsigned). Play it safe and say we didn't transfer anything.
* transfer anything.
*/ */
if (urb->actual_length > urb->transfer_buffer_length) { if (urb->actual_length > urb->transfer_buffer_length) {
xhci_warn(xhci, "URB transfer length is wrong, " xhci_warn(xhci, "URB transfer length is wrong, xHC issue? req. len = %u, act. len = %u\n",
"xHC issue? req. len = %u, "
"act. len = %u\n",
urb->transfer_buffer_length, urb->transfer_buffer_length,
urb->actual_length); urb->actual_length);
urb->actual_length = 0; urb->actual_length = 0;
...@@ -1874,14 +1869,12 @@ static int finish_td(struct xhci_hcd *xhci, struct xhci_td *td, ...@@ -1874,14 +1869,12 @@ static int finish_td(struct xhci_hcd *xhci, struct xhci_td *td,
ret = 1; ret = 1;
if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) { if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) {
xhci_to_hcd(xhci)->self.bandwidth_isoc_reqs--; xhci_to_hcd(xhci)->self.bandwidth_isoc_reqs--;
if (xhci_to_hcd(xhci)->self.bandwidth_isoc_reqs if (xhci_to_hcd(xhci)->self.bandwidth_isoc_reqs == 0) {
== 0) {
if (xhci->quirks & XHCI_AMD_PLL_FIX) if (xhci->quirks & XHCI_AMD_PLL_FIX)
usb_amd_quirk_pll_enable(); usb_amd_quirk_pll_enable();
} }
} }
} }
}
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册