]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
usb: xhci: remove unused trace operation and argument
authorNiklas Neronin <niklas.neronin@linux.intel.com>
Wed, 19 Nov 2025 14:24:07 +0000 (16:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Nov 2025 13:53:00 +0000 (14:53 +0100)
Remove endpoint number 'ep_num' argument and memory operation from
xhci_log_ctx() trace function. These changes were added in commit
1d27fabec068 ("xhci: add xhci_address_ctx trace event") on Aug 14, 2013
and have never been used.

Signed-off-by: Niklas Neronin <niklas.neronin@linux.intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://patch.msgid.link/20251119142417.2820519-14-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-trace.h
drivers/usb/host/xhci.c

index 481becbcbf8130254522b4ea92d353a583e77759..8e5b8e1282f781de48c955131bcf39fc0cb3fe6a 100644 (file)
@@ -71,18 +71,13 @@ DEFINE_EVENT(xhci_log_msg, xhci_dbg_ring_expansion,
 );
 
 DECLARE_EVENT_CLASS(xhci_log_ctx,
-       TP_PROTO(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx,
-                unsigned int ep_num),
-       TP_ARGS(xhci, ctx, ep_num),
+       TP_PROTO(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx),
+       TP_ARGS(xhci, ctx),
        TP_STRUCT__entry(
                __field(int, ctx_64)
                __field(unsigned, ctx_type)
                __field(dma_addr_t, ctx_dma)
                __field(u8 *, ctx_va)
-               __field(unsigned, ctx_ep_num)
-               __dynamic_array(u32, ctx_data,
-                       ((HCC_64BYTE_CONTEXT(xhci->hcc_params) + 1) * 8) *
-                       ((ctx->type == XHCI_CTX_TYPE_INPUT) + ep_num + 1))
        ),
        TP_fast_assign(
 
@@ -90,10 +85,6 @@ DECLARE_EVENT_CLASS(xhci_log_ctx,
                __entry->ctx_type = ctx->type;
                __entry->ctx_dma = ctx->dma;
                __entry->ctx_va = ctx->bytes;
-               __entry->ctx_ep_num = ep_num;
-               memcpy(__get_dynamic_array(ctx_data), ctx->bytes,
-                       ((HCC_64BYTE_CONTEXT(xhci->hcc_params) + 1) * 32) *
-                       ((ctx->type == XHCI_CTX_TYPE_INPUT) + ep_num + 1));
        ),
        TP_printk("ctx_64=%d, ctx_type=%u, ctx_dma=@%llx, ctx_va=@%p",
                        __entry->ctx_64, __entry->ctx_type,
@@ -102,9 +93,8 @@ DECLARE_EVENT_CLASS(xhci_log_ctx,
 );
 
 DEFINE_EVENT(xhci_log_ctx, xhci_address_ctx,
-       TP_PROTO(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx,
-                unsigned int ep_num),
-       TP_ARGS(xhci, ctx, ep_num)
+       TP_PROTO(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx),
+       TP_ARGS(xhci, ctx)
 );
 
 DECLARE_EVENT_CLASS(xhci_log_trb,
index 593b9d3aa9b6ec618ae4a5c5eed09b800d7e7387..7ac8198d0d7b83e2db02ee57b85b07c707de50bc 100644 (file)
@@ -4379,8 +4379,7 @@ static int xhci_setup_device(struct usb_hcd *hcd, struct usb_device *udev,
        ctrl_ctx->add_flags = cpu_to_le32(SLOT_FLAG | EP0_FLAG);
        ctrl_ctx->drop_flags = 0;
 
-       trace_xhci_address_ctx(xhci, virt_dev->in_ctx,
-                               le32_to_cpu(slot_ctx->dev_info) >> 27);
+       trace_xhci_address_ctx(xhci, virt_dev->in_ctx);
 
        trace_xhci_address_ctrl_ctx(ctrl_ctx);
        spin_lock_irqsave(&xhci->lock, flags);
@@ -4440,7 +4439,7 @@ static int xhci_setup_device(struct usb_hcd *hcd, struct usb_device *udev,
                xhci_err(xhci,
                         "ERROR: unexpected setup %s command completion code 0x%x.\n",
                         act, command->status);
-               trace_xhci_address_ctx(xhci, virt_dev->out_ctx, 1);
+               trace_xhci_address_ctx(xhci, virt_dev->out_ctx);
                ret = -EINVAL;
                break;
        }
@@ -4458,14 +4457,12 @@ static int xhci_setup_device(struct usb_hcd *hcd, struct usb_device *udev,
        xhci_dbg_trace(xhci, trace_xhci_dbg_address,
                        "Output Context DMA address = %#08llx",
                        (unsigned long long)virt_dev->out_ctx->dma);
-       trace_xhci_address_ctx(xhci, virt_dev->in_ctx,
-                               le32_to_cpu(slot_ctx->dev_info) >> 27);
+       trace_xhci_address_ctx(xhci, virt_dev->in_ctx);
        /*
         * USB core uses address 1 for the roothubs, so we add one to the
         * address given back to us by the HC.
         */
-       trace_xhci_address_ctx(xhci, virt_dev->out_ctx,
-                               le32_to_cpu(slot_ctx->dev_info) >> 27);
+       trace_xhci_address_ctx(xhci, virt_dev->out_ctx);
        /* Zero the input context control for later use */
        ctrl_ctx->add_flags = 0;
        ctrl_ctx->drop_flags = 0;