Re: [PATCH 29/46] libata-sff: add tracepoints for ata_sff_flush_pio_task()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/4/20 5:55 PM, Hannes Reinecke wrote:
> Replace DPRINTK calls with tracepoints.

Please consider moving the removal to a separate (post-)patch
(for consistency with reset tracepoints conversion etc.).

Also there are some complaints from checkpatch.pl script
regarding CodingStyle:

ERROR: space prohibited after that open parenthesis '('
#119: FILE: include/trace/events/libata.h:619:
+               __field( unsigned int,  ata_port )

ERROR: space prohibited before that close parenthesis ')'
#119: FILE: include/trace/events/libata.h:619:
+               __field( unsigned int,  ata_port )

ERROR: space prohibited after that open parenthesis '('
#120: FILE: include/trace/events/libata.h:620:
+               __field( unsigned char, hsm_state )

ERROR: space prohibited before that close parenthesis ')'
#120: FILE: include/trace/events/libata.h:620:
+               __field( unsigned char, hsm_state )

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

> Signed-off-by: Hannes Reinecke <hare@xxxxxxxx>
> ---
>  drivers/ata/libata-sff.c      |  5 +----
>  include/trace/events/libata.h | 25 +++++++++++++++++++++++++
>  2 files changed, 26 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
> index 6b961eadc201..228f801ef611 100644
> --- a/drivers/ata/libata-sff.c
> +++ b/drivers/ata/libata-sff.c
> @@ -1234,7 +1234,7 @@ EXPORT_SYMBOL_GPL(ata_sff_queue_pio_task);
>  
>  void ata_sff_flush_pio_task(struct ata_port *ap)
>  {
> -	DPRINTK("ENTER\n");
> +	trace_ata_sff_flush_pio_task(ap);
>  
>  	cancel_delayed_work_sync(&ap->sff_pio_task);
>  
> @@ -1251,9 +1251,6 @@ void ata_sff_flush_pio_task(struct ata_port *ap)
>  	spin_unlock_irq(ap->lock);
>  
>  	ap->sff_pio_task_link = NULL;
> -
> -	if (ata_msg_ctl(ap))
> -		ata_port_dbg(ap, "%s: EXIT\n", __func__);
>  }
>  
>  static void ata_sff_pio_task(struct work_struct *work)
> diff --git a/include/trace/events/libata.h b/include/trace/events/libata.h
> index acfc5d739b17..446f56cb3f01 100644
> --- a/include/trace/events/libata.h
> +++ b/include/trace/events/libata.h
> @@ -609,6 +609,31 @@ DEFINE_EVENT(ata_transfer_data_template, atapi_send_cdb,
>  	     TP_PROTO(struct ata_queued_cmd *qc, unsigned int offset, unsigned int count),
>  	     TP_ARGS(qc, offset, count));
>  
> +DECLARE_EVENT_CLASS(ata_sff_template,
> +
> +	TP_PROTO(struct ata_port *ap),
> +
> +	TP_ARGS(ap),
> +
> +	TP_STRUCT__entry(
> +		__field( unsigned int,	ata_port )
> +		__field( unsigned char,	hsm_state )
> +	),
> +
> +	TP_fast_assign(
> +		__entry->ata_port	= ap->print_id;
> +		__entry->hsm_state	= ap->hsm_task_state;
> +	),
> +
> +	TP_printk("ata_port=%u task_state=%s",
> +		  __entry->ata_port,
> +		  show_sff_hsm_state_name(__entry->hsm_state))
> +);
> +
> +DEFINE_EVENT(ata_sff_template, ata_sff_flush_pio_task,
> +	     TP_PROTO(struct ata_port *ap),
> +	     TP_ARGS(ap));
> +
>  #endif /*  _TRACE_LIBATA_H */
>  
>  /* This part must be outside protection */
>



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux