Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: xhci: remove unused trace operation and argument

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>

authored by

Niklas Neronin and committed by
Greg Kroah-Hartman
2085fa6c 6c268971

+8 -21
+4 -14
drivers/usb/host/xhci-trace.h
··· 71 71 ); 72 72 73 73 DECLARE_EVENT_CLASS(xhci_log_ctx, 74 - TP_PROTO(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx, 75 - unsigned int ep_num), 76 - TP_ARGS(xhci, ctx, ep_num), 74 + TP_PROTO(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx), 75 + TP_ARGS(xhci, ctx), 77 76 TP_STRUCT__entry( 78 77 __field(int, ctx_64) 79 78 __field(unsigned, ctx_type) 80 79 __field(dma_addr_t, ctx_dma) 81 80 __field(u8 *, ctx_va) 82 - __field(unsigned, ctx_ep_num) 83 - __dynamic_array(u32, ctx_data, 84 - ((HCC_64BYTE_CONTEXT(xhci->hcc_params) + 1) * 8) * 85 - ((ctx->type == XHCI_CTX_TYPE_INPUT) + ep_num + 1)) 86 81 ), 87 82 TP_fast_assign( 88 83 ··· 85 90 __entry->ctx_type = ctx->type; 86 91 __entry->ctx_dma = ctx->dma; 87 92 __entry->ctx_va = ctx->bytes; 88 - __entry->ctx_ep_num = ep_num; 89 - memcpy(__get_dynamic_array(ctx_data), ctx->bytes, 90 - ((HCC_64BYTE_CONTEXT(xhci->hcc_params) + 1) * 32) * 91 - ((ctx->type == XHCI_CTX_TYPE_INPUT) + ep_num + 1)); 92 93 ), 93 94 TP_printk("ctx_64=%d, ctx_type=%u, ctx_dma=@%llx, ctx_va=@%p", 94 95 __entry->ctx_64, __entry->ctx_type, ··· 93 102 ); 94 103 95 104 DEFINE_EVENT(xhci_log_ctx, xhci_address_ctx, 96 - TP_PROTO(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx, 97 - unsigned int ep_num), 98 - TP_ARGS(xhci, ctx, ep_num) 105 + TP_PROTO(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx), 106 + TP_ARGS(xhci, ctx) 99 107 ); 100 108 101 109 DECLARE_EVENT_CLASS(xhci_log_trb,
+4 -7
drivers/usb/host/xhci.c
··· 4379 4379 ctrl_ctx->add_flags = cpu_to_le32(SLOT_FLAG | EP0_FLAG); 4380 4380 ctrl_ctx->drop_flags = 0; 4381 4381 4382 - trace_xhci_address_ctx(xhci, virt_dev->in_ctx, 4383 - le32_to_cpu(slot_ctx->dev_info) >> 27); 4382 + trace_xhci_address_ctx(xhci, virt_dev->in_ctx); 4384 4383 4385 4384 trace_xhci_address_ctrl_ctx(ctrl_ctx); 4386 4385 spin_lock_irqsave(&xhci->lock, flags); ··· 4439 4440 xhci_err(xhci, 4440 4441 "ERROR: unexpected setup %s command completion code 0x%x.\n", 4441 4442 act, command->status); 4442 - trace_xhci_address_ctx(xhci, virt_dev->out_ctx, 1); 4443 + trace_xhci_address_ctx(xhci, virt_dev->out_ctx); 4443 4444 ret = -EINVAL; 4444 4445 break; 4445 4446 } ··· 4457 4458 xhci_dbg_trace(xhci, trace_xhci_dbg_address, 4458 4459 "Output Context DMA address = %#08llx", 4459 4460 (unsigned long long)virt_dev->out_ctx->dma); 4460 - trace_xhci_address_ctx(xhci, virt_dev->in_ctx, 4461 - le32_to_cpu(slot_ctx->dev_info) >> 27); 4461 + trace_xhci_address_ctx(xhci, virt_dev->in_ctx); 4462 4462 /* 4463 4463 * USB core uses address 1 for the roothubs, so we add one to the 4464 4464 * address given back to us by the HC. 4465 4465 */ 4466 - trace_xhci_address_ctx(xhci, virt_dev->out_ctx, 4467 - le32_to_cpu(slot_ctx->dev_info) >> 27); 4466 + trace_xhci_address_ctx(xhci, virt_dev->out_ctx); 4468 4467 /* Zero the input context control for later use */ 4469 4468 ctrl_ctx->add_flags = 0; 4470 4469 ctrl_ctx->drop_flags = 0;