Re: [PATCH 14/46] libata: add reset tracepoints

Hannes Reinecke
2020-02-12T10:11:07Z

On 2/10/20 2:42 PM, Bartlomiej Zolnierkiewicz wrote:
>
> On 2/4/20 5:55 PM, Hannes Reinecke wrote:
>> To follow the flow of control we should be using tracepoints, as
>> they will tie in with the actual I/O flow and deliver a better
>> overview about what it happening.
>> This patch adds tracepoints for hard and soft reset and adds
>> them in the libata-eh control flow.
>>
>> Signed-off-by: Hannes Reinecke <hare@suse.de>
>
> checkpatch.pl complains about CodingStyle issues:
>
> WARNING: line over 80 characters
> #164: FILE: include/trace/events/libata.h:350:
> + TP_PROTO(struct ata_link *link, unsigned int *class, unsigned long deadline),
>
> ERROR: space prohibited after that open parenthesis '('
> #169: FILE: include/trace/events/libata.h:355:
> + __field( unsigned int, ata_port )
>
> ERROR: space prohibited before that close parenthesis ')'
> #169: FILE: include/trace/events/libata.h:355:
> + __field( unsigned int, ata_port )
>
> ERROR: space prohibited after that open parenthesis '('
> #170: FILE: include/trace/events/libata.h:356:
> + __array( unsigned int, class, 2)
>
> ERROR: space prohibited after that open parenthesis '('
> #171: FILE: include/trace/events/libata.h:357:
> + __field( unsigned long, deadline)
>
> WARNING: line over 80 characters
> #187: FILE: include/trace/events/libata.h:373:
> + TP_PROTO(struct ata_link *link, unsigned int *class, unsigned long deadline),
>
> WARNING: line over 80 characters
> #191: FILE: include/trace/events/libata.h:377:
> + TP_PROTO(struct ata_link *link, unsigned int *class, unsigned long deadline),
>
> WARNING: line over 80 characters
> #195: FILE: include/trace/events/libata.h:381:
> + TP_PROTO(struct ata_link *link, unsigned int *class, unsigned long deadline),
>
> ERROR: space prohibited after that open parenthesis '('
> #205: FILE: include/trace/events/libata.h:391:
> + __field( unsigned int, ata_port )
>
> ERROR: space prohibited before that close parenthesis ')'
> #205: FILE: include/trace/events/libata.h:391:
> + __field( unsigned int, ata_port )
>
> ERROR: space prohibited after that open parenthesis '('
> #206: FILE: include/trace/events/libata.h:392:
> + __array( unsigned int, class, 2)
>
> ERROR: space prohibited after that open parenthesis '('
> #207: FILE: include/trace/events/libata.h:393:
> + __field( int, rc)
>
> Otherwise the patch looks fine.
>
[ .. ]
This is just following the existing coding style used in the trace event
declaration. Seeing that tracepoint generation is quite black magic in
itself I'd rather keep it in-line with the rest of the header file.

Cheers,

Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), GF: Felix Imendörffer