[PATCH 3/3] cdnsp: Remove unused tracepoints

Steven Rostedt posted 3 patches 1 month ago
[PATCH 3/3] cdnsp: Remove unused tracepoints
Posted by Steven Rostedt 1 month ago
From: Steven Rostedt <rostedt@goodmis.org>

Tracepoints that are defined take up around 5K each, even if they are not
used. If they are defined and not used, then they waste memory for unused
code. Soon unused tracepoints will cause warnings.

Remove the unused tracepoints of the cdnsp subsystem. They are:

cdnsp_defered_event
cdnsp_ep0_halted
cdnsp_free_priv_device
cdnsp_handle_cmd_flush_ep

Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 drivers/usb/cdns3/cdnsp-trace.h | 25 -------------------------
 1 file changed, 25 deletions(-)

diff --git a/drivers/usb/cdns3/cdnsp-trace.h b/drivers/usb/cdns3/cdnsp-trace.h
index f2bcf77a5d0a..9b33a736c3de 100644
--- a/drivers/usb/cdns3/cdnsp-trace.h
+++ b/drivers/usb/cdns3/cdnsp-trace.h
@@ -178,11 +178,6 @@ DEFINE_EVENT(cdnsp_log_simple, cdnsp_ep0_set_config,
 	TP_ARGS(msg)
 );
 
-DEFINE_EVENT(cdnsp_log_simple, cdnsp_ep0_halted,
-	TP_PROTO(char *msg),
-	TP_ARGS(msg)
-);
-
 DEFINE_EVENT(cdnsp_log_simple, cdnsp_ep_halt,
 	TP_PROTO(char *msg),
 	TP_ARGS(msg)
@@ -399,11 +394,6 @@ DEFINE_EVENT(cdnsp_log_trb, cdnsp_cmd_timeout,
 	TP_ARGS(ring, trb)
 );
 
-DEFINE_EVENT(cdnsp_log_trb, cdnsp_defered_event,
-	TP_PROTO(struct cdnsp_ring *ring, struct cdnsp_generic_trb *trb),
-	TP_ARGS(ring, trb)
-);
-
 DECLARE_EVENT_CLASS(cdnsp_log_pdev,
 	TP_PROTO(struct cdnsp_device *pdev),
 	TP_ARGS(pdev),
@@ -433,16 +423,6 @@ DEFINE_EVENT(cdnsp_log_pdev, cdnsp_alloc_priv_device,
 	TP_ARGS(vdev)
 );
 
-DEFINE_EVENT(cdnsp_log_pdev, cdnsp_free_priv_device,
-	TP_PROTO(struct cdnsp_device *vdev),
-	TP_ARGS(vdev)
-);
-
-DEFINE_EVENT(cdnsp_log_pdev, cdnsp_setup_device,
-	TP_PROTO(struct cdnsp_device *vdev),
-	TP_ARGS(vdev)
-);
-
 DEFINE_EVENT(cdnsp_log_pdev, cdnsp_setup_addressable_priv_device,
 	TP_PROTO(struct cdnsp_device *vdev),
 	TP_ARGS(vdev)
@@ -575,11 +555,6 @@ DEFINE_EVENT(cdnsp_log_ep_ctx, cdnsp_handle_cmd_stop_ep,
 	TP_ARGS(ctx)
 );
 
-DEFINE_EVENT(cdnsp_log_ep_ctx, cdnsp_handle_cmd_flush_ep,
-	TP_PROTO(struct cdnsp_ep_ctx *ctx),
-	TP_ARGS(ctx)
-);
-
 DEFINE_EVENT(cdnsp_log_ep_ctx, cdnsp_handle_cmd_set_deq_ep,
 	TP_PROTO(struct cdnsp_ep_ctx *ctx),
 	TP_ARGS(ctx)
-- 
2.50.1
Re: [PATCH 3/3] cdnsp: Remove unused tracepoints
Posted by Peter Chen (CIX) 1 month ago
On 25-08-28 21:55:55, Steven Rostedt wrote:
> From: Steven Rostedt <rostedt@goodmis.org>
> 
> Tracepoints that are defined take up around 5K each, even if they are not
> used. If they are defined and not used, then they waste memory for unused
> code. Soon unused tracepoints will cause warnings.
> 
> Remove the unused tracepoints of the cdnsp subsystem. They are:
> 
> cdnsp_defered_event
> cdnsp_ep0_halted
> cdnsp_free_priv_device
> cdnsp_handle_cmd_flush_ep
> 
> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>

Acked-by: Peter Chen <peter.chen@kernel.org>

Peter
> ---
>  drivers/usb/cdns3/cdnsp-trace.h | 25 -------------------------
>  1 file changed, 25 deletions(-)
> 
> diff --git a/drivers/usb/cdns3/cdnsp-trace.h b/drivers/usb/cdns3/cdnsp-trace.h
> index f2bcf77a5d0a..9b33a736c3de 100644
> --- a/drivers/usb/cdns3/cdnsp-trace.h
> +++ b/drivers/usb/cdns3/cdnsp-trace.h
> @@ -178,11 +178,6 @@ DEFINE_EVENT(cdnsp_log_simple, cdnsp_ep0_set_config,
>  	TP_ARGS(msg)
>  );
>  
> -DEFINE_EVENT(cdnsp_log_simple, cdnsp_ep0_halted,
> -	TP_PROTO(char *msg),
> -	TP_ARGS(msg)
> -);
> -
>  DEFINE_EVENT(cdnsp_log_simple, cdnsp_ep_halt,
>  	TP_PROTO(char *msg),
>  	TP_ARGS(msg)
> @@ -399,11 +394,6 @@ DEFINE_EVENT(cdnsp_log_trb, cdnsp_cmd_timeout,
>  	TP_ARGS(ring, trb)
>  );
>  
> -DEFINE_EVENT(cdnsp_log_trb, cdnsp_defered_event,
> -	TP_PROTO(struct cdnsp_ring *ring, struct cdnsp_generic_trb *trb),
> -	TP_ARGS(ring, trb)
> -);
> -
>  DECLARE_EVENT_CLASS(cdnsp_log_pdev,
>  	TP_PROTO(struct cdnsp_device *pdev),
>  	TP_ARGS(pdev),
> @@ -433,16 +423,6 @@ DEFINE_EVENT(cdnsp_log_pdev, cdnsp_alloc_priv_device,
>  	TP_ARGS(vdev)
>  );
>  
> -DEFINE_EVENT(cdnsp_log_pdev, cdnsp_free_priv_device,
> -	TP_PROTO(struct cdnsp_device *vdev),
> -	TP_ARGS(vdev)
> -);
> -
> -DEFINE_EVENT(cdnsp_log_pdev, cdnsp_setup_device,
> -	TP_PROTO(struct cdnsp_device *vdev),
> -	TP_ARGS(vdev)
> -);
> -
>  DEFINE_EVENT(cdnsp_log_pdev, cdnsp_setup_addressable_priv_device,
>  	TP_PROTO(struct cdnsp_device *vdev),
>  	TP_ARGS(vdev)
> @@ -575,11 +555,6 @@ DEFINE_EVENT(cdnsp_log_ep_ctx, cdnsp_handle_cmd_stop_ep,
>  	TP_ARGS(ctx)
>  );
>  
> -DEFINE_EVENT(cdnsp_log_ep_ctx, cdnsp_handle_cmd_flush_ep,
> -	TP_PROTO(struct cdnsp_ep_ctx *ctx),
> -	TP_ARGS(ctx)
> -);
> -
>  DEFINE_EVENT(cdnsp_log_ep_ctx, cdnsp_handle_cmd_set_deq_ep,
>  	TP_PROTO(struct cdnsp_ep_ctx *ctx),
>  	TP_ARGS(ctx)
> -- 
> 2.50.1
> 
> 

-- 

Best regards,
Peter