]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
usb: xhci: Remove unused parameters of next_trb()
authorMichal Pecio <michal.pecio@gmail.com>
Wed, 6 Nov 2024 10:14:28 +0000 (12:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Nov 2024 12:26:14 +0000 (13:26 +0100)
The function has two parameters which it doesn't use and hasn't ever
used. One caller even puts NULL there, knowing it will work anyway.

Signed-off-by: Michal Pecio <michal.pecio@gmail.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20241106101459.775897-3-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-ring.c

index 9f1e150a1c76d435101281a9ea2afcdc338b0eca..36ccf0dac7faf6f4807cf4d1116b7b5baf670b1a 100644 (file)
@@ -145,10 +145,8 @@ static void trb_to_noop(union xhci_trb *trb, u32 noop_type)
  * TRB is in a new segment.  This does not skip over link TRBs, and it does not
  * effect the ring dequeue or enqueue pointers.
  */
-static void next_trb(struct xhci_hcd *xhci,
-               struct xhci_ring *ring,
-               struct xhci_segment **seg,
-               union xhci_trb **trb)
+static void next_trb(struct xhci_segment **seg,
+                       union xhci_trb **trb)
 {
        if (trb_is_link(*trb) || last_trb_on_seg(*seg, *trb)) {
                *seg = (*seg)->next;
@@ -446,9 +444,9 @@ static int xhci_abort_cmd_ring(struct xhci_hcd *xhci, unsigned long flags)
         * avoiding corrupting the command ring pointer in case the command ring
         * is stopped by the time the upper dword is written.
         */
-       next_trb(xhci, NULL, &new_seg, &new_deq);
+       next_trb(&new_seg, &new_deq);
        if (trb_is_link(new_deq))
-               next_trb(xhci, NULL, &new_seg, &new_deq);
+               next_trb(&new_seg, &new_deq);
 
        crcr = xhci_trb_virt_to_dma(new_seg, new_deq);
        xhci_write_64(xhci, crcr | CMD_RING_ABORT, &xhci->op_regs->cmd_ring);
@@ -678,7 +676,7 @@ static int xhci_move_dequeue_past_td(struct xhci_hcd *xhci,
                    link_trb_toggles_cycle(new_deq))
                        new_cycle ^= 0x1;
 
-               next_trb(xhci, ep_ring, &new_seg, &new_deq);
+               next_trb(&new_seg, &new_deq);
 
                /* Search wrapped around, bail out */
                if (new_deq == ep->ring->dequeue) {
@@ -756,7 +754,7 @@ static void td_to_noop(struct xhci_hcd *xhci, struct xhci_ring *ep_ring,
                if (trb == td->last_trb)
                        break;
 
-               next_trb(xhci, ep_ring, &seg, &trb);
+               next_trb(&seg, &trb);
        }
 }
 
@@ -2273,7 +2271,7 @@ static int sum_trb_lengths(struct xhci_hcd *xhci, struct xhci_ring *ring,
        union xhci_trb *trb = ring->dequeue;
        struct xhci_segment *seg = ring->deq_seg;
 
-       for (sum = 0; trb != stop_trb; next_trb(xhci, ring, &seg, &trb)) {
+       for (sum = 0; trb != stop_trb; next_trb(&seg, &trb)) {
                if (!trb_is_noop(trb) && !trb_is_link(trb))
                        sum += TRB_LEN(le32_to_cpu(trb->generic.field[2]));
        }