All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: xhci: Remove unused udev from xhci_log_ctx trace event
@ 2023-03-23 13:13 Udipto Goswami
  2023-03-23 14:15 ` Mathias Nyman
  0 siblings, 1 reply; 4+ messages in thread
From: Udipto Goswami @ 2023-03-23 13:13 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Mathias Nyman
  Cc: Pratham Pratap, Jack Pham, linux-usb, Udipto Goswami

xhci_log_ctx event is not utilizing the extracted udev to
print out anything, hence removing it.

Fixes: 1d27fabec068 ("xhci: add xhci_address_ctx trace event")
Signed-off-by: Udipto Goswami <quic_ugoswami@quicinc.com>
---
 drivers/usb/host/xhci-trace.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/usb/host/xhci-trace.h b/drivers/usb/host/xhci-trace.h
index 4286dba5b157..7555c4ea7c4b 100644
--- a/drivers/usb/host/xhci-trace.h
+++ b/drivers/usb/host/xhci-trace.h
@@ -80,20 +80,16 @@ DECLARE_EVENT_CLASS(xhci_log_ctx,
 		__field(dma_addr_t, ctx_dma)
 		__field(u8 *, ctx_va)
 		__field(unsigned, ctx_ep_num)
-		__field(int, slot_id)
 		__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(
-		struct usb_device *udev;
 
-		udev = to_usb_device(xhci_to_hcd(xhci)->self.controller);
 		__entry->ctx_64 = HCC_64BYTE_CONTEXT(xhci->hcc_params);
 		__entry->ctx_type = ctx->type;
 		__entry->ctx_dma = ctx->dma;
 		__entry->ctx_va = ctx->bytes;
-		__entry->slot_id = udev->slot_id;
 		__entry->ctx_ep_num = ep_num;
 		memcpy(__get_dynamic_array(ctx_data), ctx->bytes,
 			((HCC_64BYTE_CONTEXT(xhci->hcc_params) + 1) * 32) *
-- 
2.17.1


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

* Re: [PATCH] usb: xhci: Remove unused udev from xhci_log_ctx trace event
  2023-03-23 13:13 [PATCH] usb: xhci: Remove unused udev from xhci_log_ctx trace event Udipto Goswami
@ 2023-03-23 14:15 ` Mathias Nyman
  2023-05-09  5:10   ` Udipto Goswami
  0 siblings, 1 reply; 4+ messages in thread
From: Mathias Nyman @ 2023-03-23 14:15 UTC (permalink / raw)
  To: Udipto Goswami, Greg Kroah-Hartman, Mathias Nyman
  Cc: Pratham Pratap, Jack Pham, linux-usb

On 23.3.2023 15.13, Udipto Goswami wrote:
> xhci_log_ctx event is not utilizing the extracted udev to
> print out anything, hence removing it.
> 
> Fixes: 1d27fabec068 ("xhci: add xhci_address_ctx trace event")
> Signed-off-by: Udipto Goswami <quic_ugoswami@quicinc.com>
> ---
>   drivers/usb/host/xhci-trace.h | 4 ----
>   1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/usb/host/xhci-trace.h b/drivers/usb/host/xhci-trace.h
> index 4286dba5b157..7555c4ea7c4b 100644
> --- a/drivers/usb/host/xhci-trace.h
> +++ b/drivers/usb/host/xhci-trace.h
> @@ -80,20 +80,16 @@ DECLARE_EVENT_CLASS(xhci_log_ctx,
>   		__field(dma_addr_t, ctx_dma)
>   		__field(u8 *, ctx_va)
>   		__field(unsigned, ctx_ep_num)
> -		__field(int, slot_id)
>   		__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(
> -		struct usb_device *udev;
>   
> -		udev = to_usb_device(xhci_to_hcd(xhci)->self.controller);

Looks like this was flawed from the beginning, forcing a device struct for a host controller into
a struct usb_device

Adding to queue

Thanks
Mathias

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

* Re: [PATCH] usb: xhci: Remove unused udev from xhci_log_ctx trace event
  2023-03-23 14:15 ` Mathias Nyman
@ 2023-05-09  5:10   ` Udipto Goswami
  2023-05-09  8:06     ` Mathias Nyman
  0 siblings, 1 reply; 4+ messages in thread
From: Udipto Goswami @ 2023-05-09  5:10 UTC (permalink / raw)
  To: Mathias Nyman, Greg Kroah-Hartman, Mathias Nyman
  Cc: Pratham Pratap, Jack Pham, linux-usb



On 3/23/23 7:45 PM, Mathias Nyman wrote:
> On 23.3.2023 15.13, Udipto Goswami wrote:
>> xhci_log_ctx event is not utilizing the extracted udev to
>> print out anything, hence removing it.
>>
>> Fixes: 1d27fabec068 ("xhci: add xhci_address_ctx trace event")
>> Signed-off-by: Udipto Goswami <quic_ugoswami@quicinc.com>
>> ---
>>   drivers/usb/host/xhci-trace.h | 4 ----
>>   1 file changed, 4 deletions(-)
>>
>> diff --git a/drivers/usb/host/xhci-trace.h 
>> b/drivers/usb/host/xhci-trace.h
>> index 4286dba5b157..7555c4ea7c4b 100644
>> --- a/drivers/usb/host/xhci-trace.h
>> +++ b/drivers/usb/host/xhci-trace.h
>> @@ -80,20 +80,16 @@ DECLARE_EVENT_CLASS(xhci_log_ctx,
>>           __field(dma_addr_t, ctx_dma)
>>           __field(u8 *, ctx_va)
>>           __field(unsigned, ctx_ep_num)
>> -        __field(int, slot_id)
>>           __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(
>> -        struct usb_device *udev;
>> -        udev = to_usb_device(xhci_to_hcd(xhci)->self.controller);
> 
> Looks like this was flawed from the beginning, forcing a device struct 
> for a host controller into
> a struct usb_device

Hi Mathias, Greg,

Seems like this patch isn't included in upstream.
Please let me know what need to be done ? If a v2 is needed to push?

Thanks,
-Udipto



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

* Re: [PATCH] usb: xhci: Remove unused udev from xhci_log_ctx trace event
  2023-05-09  5:10   ` Udipto Goswami
@ 2023-05-09  8:06     ` Mathias Nyman
  0 siblings, 0 replies; 4+ messages in thread
From: Mathias Nyman @ 2023-05-09  8:06 UTC (permalink / raw)
  To: Udipto Goswami, Mathias Nyman, Greg Kroah-Hartman
  Cc: Pratham Pratap, Jack Pham, linux-usb

On 9.5.2023 8.10, Udipto Goswami wrote:
> 
> 
> On 3/23/23 7:45 PM, Mathias Nyman wrote:
>> On 23.3.2023 15.13, Udipto Goswami wrote:
>>> xhci_log_ctx event is not utilizing the extracted udev to
>>> print out anything, hence removing it.
>>>
>>> Fixes: 1d27fabec068 ("xhci: add xhci_address_ctx trace event")
>>> Signed-off-by: Udipto Goswami <quic_ugoswami@quicinc.com>
>>> ---
>>>   drivers/usb/host/xhci-trace.h | 4 ----
>>>   1 file changed, 4 deletions(-)
>>>
>>> diff --git a/drivers/usb/host/xhci-trace.h b/drivers/usb/host/xhci-trace.h
>>> index 4286dba5b157..7555c4ea7c4b 100644
>>> --- a/drivers/usb/host/xhci-trace.h
>>> +++ b/drivers/usb/host/xhci-trace.h
>>> @@ -80,20 +80,16 @@ DECLARE_EVENT_CLASS(xhci_log_ctx,
>>>           __field(dma_addr_t, ctx_dma)
>>>           __field(u8 *, ctx_va)
>>>           __field(unsigned, ctx_ep_num)
>>> -        __field(int, slot_id)
>>>           __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(
>>> -        struct usb_device *udev;
>>> -        udev = to_usb_device(xhci_to_hcd(xhci)->self.controller);
>>
>> Looks like this was flawed from the beginning, forcing a device struct for a host controller into
>> a struct usb_device
> 
> Hi Mathias, Greg,
> 
> Seems like this patch isn't included in upstream.
> Please let me know what need to be done ? If a v2 is needed to push?
> 
> Thanks,
> -Udipto

Patch is sitting in my for-usb-next branch and will be sent forward with the other
patches soon

https://git.kernel.org/pub/scm/linux/kernel/git/mnyman/xhci.git/log/?h=for-usb-next

Thanks
Mathias



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

end of thread, other threads:[~2023-05-09  8:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-23 13:13 [PATCH] usb: xhci: Remove unused udev from xhci_log_ctx trace event Udipto Goswami
2023-03-23 14:15 ` Mathias Nyman
2023-05-09  5:10   ` Udipto Goswami
2023-05-09  8:06     ` Mathias Nyman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.