linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] usb: xhci: Remove ep_trb from xhci_cleanup_halted_endpoint()
@ 2018-01-10  4:59 Lu Baolu
  2018-01-10  4:59 ` [PATCH 2/2] usb: xhci: Remove ep_trb from finish_td() Lu Baolu
  2018-01-11 11:34 ` [PATCH 1/2] usb: xhci: Remove ep_trb from xhci_cleanup_halted_endpoint() Mathias Nyman
  0 siblings, 2 replies; 3+ messages in thread
From: Lu Baolu @ 2018-01-10  4:59 UTC (permalink / raw)
  To: Mathias Nyman, Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel, Lu Baolu

Function argument ep_trb for xhci_cleanup_halted_endpoint() isn't
needed anymore. Cleanup it.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
---
 drivers/usb/host/xhci-ring.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index daa94c3..642a070 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -1815,8 +1815,7 @@ struct xhci_segment *trb_in_td(struct xhci_hcd *xhci,
 
 static void xhci_cleanup_halted_endpoint(struct xhci_hcd *xhci,
 		unsigned int slot_id, unsigned int ep_index,
-		unsigned int stream_id,
-		struct xhci_td *td, union xhci_trb *ep_trb,
+		unsigned int stream_id, struct xhci_td *td,
 		enum xhci_ep_reset_type reset_type)
 {
 	struct xhci_virt_ep *ep = &xhci->devs[slot_id]->eps[ep_index];
@@ -1957,8 +1956,7 @@ static int finish_td(struct xhci_hcd *xhci, struct xhci_td *td,
 		 * The class driver clears the device side halt later.
 		 */
 		xhci_cleanup_halted_endpoint(xhci, slot_id, ep_index,
-					ep_ring->stream_id, td, ep_trb,
-					EP_HARD_RESET);
+					ep_ring->stream_id, td, EP_HARD_RESET);
 	} else {
 		/* Update ring dequeue pointer */
 		while (ep_ring->dequeue != td->last_trb)
@@ -2318,7 +2316,7 @@ static int handle_tx_event(struct xhci_hcd *xhci,
 		case COMP_INVALID_STREAM_TYPE_ERROR:
 		case COMP_INVALID_STREAM_ID_ERROR:
 			xhci_cleanup_halted_endpoint(xhci, slot_id, ep_index, 0,
-						     NULL, NULL, EP_SOFT_RESET);
+						     NULL, EP_SOFT_RESET);
 			goto cleanup;
 		case COMP_RING_UNDERRUN:
 		case COMP_RING_OVERRUN:
@@ -2584,8 +2582,7 @@ static int handle_tx_event(struct xhci_hcd *xhci,
 				xhci_cleanup_halted_endpoint(xhci, slot_id,
 							     ep_index,
 							     ep_ring->stream_id,
-							     td, ep_trb,
-							     EP_HARD_RESET);
+							     td, EP_HARD_RESET);
 			goto cleanup;
 		}
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] usb: xhci: Remove ep_trb from finish_td()
  2018-01-10  4:59 [PATCH 1/2] usb: xhci: Remove ep_trb from xhci_cleanup_halted_endpoint() Lu Baolu
@ 2018-01-10  4:59 ` Lu Baolu
  2018-01-11 11:34 ` [PATCH 1/2] usb: xhci: Remove ep_trb from xhci_cleanup_halted_endpoint() Mathias Nyman
  1 sibling, 0 replies; 3+ messages in thread
From: Lu Baolu @ 2018-01-10  4:59 UTC (permalink / raw)
  To: Mathias Nyman, Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel, Lu Baolu

Function argument ep_trb for finish_td() isn't needed anymore.
Cleanup it.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
---
 drivers/usb/host/xhci-ring.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 642a070..88071c4 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -1921,7 +1921,7 @@ static int xhci_td_cleanup(struct xhci_hcd *xhci, struct xhci_td *td,
 }
 
 static int finish_td(struct xhci_hcd *xhci, struct xhci_td *td,
-	union xhci_trb *ep_trb, struct xhci_transfer_event *event,
+	struct xhci_transfer_event *event,
 	struct xhci_virt_ep *ep, int *status)
 {
 	struct xhci_virt_device *xdev;
@@ -2081,7 +2081,7 @@ static int process_ctrl_td(struct xhci_hcd *xhci, struct xhci_td *td,
 		td->urb->actual_length = requested;
 
 finish_td:
-	return finish_td(xhci, td, ep_trb, event, ep, status);
+	return finish_td(xhci, td, event, ep, status);
 }
 
 /*
@@ -2168,7 +2168,7 @@ static int process_isoc_td(struct xhci_hcd *xhci, struct xhci_td *td,
 
 	td->urb->actual_length += frame->actual_length;
 
-	return finish_td(xhci, td, ep_trb, event, ep, status);
+	return finish_td(xhci, td, event, ep, status);
 }
 
 static int skip_isoc_td(struct xhci_hcd *xhci, struct xhci_td *td,
@@ -2258,7 +2258,7 @@ static int process_bulk_intr_td(struct xhci_hcd *xhci, struct xhci_td *td,
 			  remaining);
 		td->urb->actual_length = 0;
 	}
-	return finish_td(xhci, td, ep_trb, event, ep, status);
+	return finish_td(xhci, td, event, ep, status);
 }
 
 /*
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] usb: xhci: Remove ep_trb from xhci_cleanup_halted_endpoint()
  2018-01-10  4:59 [PATCH 1/2] usb: xhci: Remove ep_trb from xhci_cleanup_halted_endpoint() Lu Baolu
  2018-01-10  4:59 ` [PATCH 2/2] usb: xhci: Remove ep_trb from finish_td() Lu Baolu
@ 2018-01-11 11:34 ` Mathias Nyman
  1 sibling, 0 replies; 3+ messages in thread
From: Mathias Nyman @ 2018-01-11 11:34 UTC (permalink / raw)
  To: Lu Baolu, Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel

On 10.01.2018 06:59, Lu Baolu wrote:
> Function argument ep_trb for xhci_cleanup_halted_endpoint() isn't
> needed anymore. Cleanup it.
> 
> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
> ---

Thanks, adding both to queue

-Mathias

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-11 11:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-10  4:59 [PATCH 1/2] usb: xhci: Remove ep_trb from xhci_cleanup_halted_endpoint() Lu Baolu
2018-01-10  4:59 ` [PATCH 2/2] usb: xhci: Remove ep_trb from finish_td() Lu Baolu
2018-01-11 11:34 ` [PATCH 1/2] usb: xhci: Remove ep_trb from xhci_cleanup_halted_endpoint() Mathias Nyman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).