@@ -283,7 +283,7 @@ static void inc_enq(struct xhci_hcd *xhci, struct xhci_ring *ring,
283283 * Only for transfer and command rings where driver is the producer, not for
284284 * event rings.
285285 */
286- static unsigned int xhci_num_trbs_free (struct xhci_hcd * xhci , struct xhci_ring * ring )
286+ static unsigned int xhci_num_trbs_free (struct xhci_ring * ring )
287287{
288288 struct xhci_segment * enq_seg = ring -> enq_seg ;
289289 union xhci_trb * enq = ring -> enqueue ;
@@ -1490,8 +1490,8 @@ static void xhci_handle_cmd_reset_ep(struct xhci_hcd *xhci, int slot_id,
14901490 ring_doorbell_for_active_rings (xhci , slot_id , ep_index );
14911491}
14921492
1493- static void xhci_handle_cmd_enable_slot (struct xhci_hcd * xhci , int slot_id ,
1494- struct xhci_command * command , u32 cmd_comp_code )
1493+ static void xhci_handle_cmd_enable_slot (int slot_id , struct xhci_command * command ,
1494+ u32 cmd_comp_code )
14951495{
14961496 if (cmd_comp_code == COMP_SUCCESS )
14971497 command -> slot_id = slot_id ;
@@ -1759,7 +1759,7 @@ static void handle_cmd_completion(struct xhci_hcd *xhci,
17591759 cmd_type = TRB_FIELD_TO_TYPE (le32_to_cpu (cmd_trb -> generic .field [3 ]));
17601760 switch (cmd_type ) {
17611761 case TRB_ENABLE_SLOT :
1762- xhci_handle_cmd_enable_slot (xhci , slot_id , cmd , cmd_comp_code );
1762+ xhci_handle_cmd_enable_slot (slot_id , cmd , cmd_comp_code );
17631763 break ;
17641764 case TRB_DISABLE_SLOT :
17651765 xhci_handle_cmd_disable_slot (xhci , slot_id );
@@ -2141,9 +2141,7 @@ static void xhci_clear_hub_tt_buffer(struct xhci_hcd *xhci, struct xhci_td *td,
21412141 * driver won't clear the halt in that case, so we need to issue a Set Transfer
21422142 * Ring Dequeue Pointer command manually.
21432143 */
2144- static int xhci_requires_manual_halt_cleanup (struct xhci_hcd * xhci ,
2145- struct xhci_ep_ctx * ep_ctx ,
2146- unsigned int trb_comp_code )
2144+ static int xhci_requires_manual_halt_cleanup (struct xhci_ep_ctx * ep_ctx , unsigned int trb_comp_code )
21472145{
21482146 /* TRB completion codes that may require a manual halt cleanup */
21492147 if (trb_comp_code == COMP_USB_TRANSACTION_ERROR ||
@@ -2328,8 +2326,7 @@ static int process_ctrl_td(struct xhci_hcd *xhci, struct xhci_virt_ep *ep,
23282326 case COMP_STOPPED_LENGTH_INVALID :
23292327 goto finish_td ;
23302328 default :
2331- if (!xhci_requires_manual_halt_cleanup (xhci ,
2332- ep_ctx , trb_comp_code ))
2329+ if (!xhci_requires_manual_halt_cleanup (ep_ctx , trb_comp_code ))
23332330 break ;
23342331 xhci_dbg (xhci , "TRB error %u, halted endpoint index = %u\n" ,
23352332 trb_comp_code , ep -> ep_index );
@@ -2804,8 +2801,7 @@ static int handle_tx_event(struct xhci_hcd *xhci,
28042801 slot_id , ep_index );
28052802 }
28062803 if (trb_comp_code == COMP_STALL_ERROR ||
2807- xhci_requires_manual_halt_cleanup (xhci , ep_ctx ,
2808- trb_comp_code )) {
2804+ xhci_requires_manual_halt_cleanup (ep_ctx , trb_comp_code )) {
28092805 xhci_handle_halted_endpoint (xhci , ep , NULL ,
28102806 EP_HARD_RESET );
28112807 }
@@ -2925,8 +2921,7 @@ static int handle_tx_event(struct xhci_hcd *xhci,
29252921
29262922 if (trb_is_noop (ep_trb )) {
29272923 if (trb_comp_code == COMP_STALL_ERROR ||
2928- xhci_requires_manual_halt_cleanup (xhci , ep_ctx ,
2929- trb_comp_code ))
2924+ xhci_requires_manual_halt_cleanup (ep_ctx , trb_comp_code ))
29302925 xhci_handle_halted_endpoint (xhci , ep , td ,
29312926 EP_HARD_RESET );
29322927 } else {
@@ -3046,8 +3041,7 @@ static void xhci_update_erst_dequeue(struct xhci_hcd *xhci,
30463041}
30473042
30483043/* Clear the interrupt pending bit for a specific interrupter. */
3049- static void xhci_clear_interrupt_pending (struct xhci_hcd * xhci ,
3050- struct xhci_interrupter * ir )
3044+ static void xhci_clear_interrupt_pending (struct xhci_interrupter * ir )
30513045{
30523046 if (!ir -> ip_autoclear ) {
30533047 u32 irq_pending ;
@@ -3068,7 +3062,7 @@ static int xhci_handle_events(struct xhci_hcd *xhci, struct xhci_interrupter *ir
30683062 int err ;
30693063 u64 temp ;
30703064
3071- xhci_clear_interrupt_pending (xhci , ir );
3065+ xhci_clear_interrupt_pending (ir );
30723066
30733067 /* Event ring hasn't been allocated yet. */
30743068 if (!ir -> event_ring || !ir -> event_ring -> dequeue ) {
@@ -3241,7 +3235,7 @@ static int prepare_ring(struct xhci_hcd *xhci, struct xhci_ring *ep_ring,
32413235
32423236 if (ep_ring != xhci -> cmd_ring ) {
32433237 new_segs = xhci_ring_expansion_needed (xhci , ep_ring , num_trbs );
3244- } else if (xhci_num_trbs_free (xhci , ep_ring ) <= num_trbs ) {
3238+ } else if (xhci_num_trbs_free (ep_ring ) <= num_trbs ) {
32453239 xhci_err (xhci , "Do not support expand command ring\n" );
32463240 return - ENOMEM ;
32473241 }
@@ -3416,8 +3410,7 @@ static void giveback_first_trb(struct xhci_hcd *xhci, int slot_id,
34163410 xhci_ring_ep_doorbell (xhci , slot_id , ep_index , stream_id );
34173411}
34183412
3419- static void check_interval (struct xhci_hcd * xhci , struct urb * urb ,
3420- struct xhci_ep_ctx * ep_ctx )
3413+ static void check_interval (struct urb * urb , struct xhci_ep_ctx * ep_ctx )
34213414{
34223415 int xhci_interval ;
34233416 int ep_interval ;
@@ -3458,7 +3451,7 @@ int xhci_queue_intr_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
34583451 struct xhci_ep_ctx * ep_ctx ;
34593452
34603453 ep_ctx = xhci_get_ep_ctx (xhci , xhci -> devs [slot_id ]-> out_ctx , ep_index );
3461- check_interval (xhci , urb , ep_ctx );
3454+ check_interval (urb , ep_ctx );
34623455
34633456 return xhci_queue_bulk_tx (xhci , mem_flags , urb , slot_id , ep_index );
34643457}
@@ -4263,7 +4256,7 @@ int xhci_queue_isoc_tx_prepare(struct xhci_hcd *xhci, gfp_t mem_flags,
42634256 * Check interval value. This should be done before we start to
42644257 * calculate the start frame value.
42654258 */
4266- check_interval (xhci , urb , ep_ctx );
4259+ check_interval (urb , ep_ctx );
42674260
42684261 /* Calculate the start frame and put it in urb->start_frame. */
42694262 if (HCC_CFC (xhci -> hcc_params ) && !list_empty (& ep_ring -> td_list )) {
0 commit comments