Re: [PATCH 1/2] input: Add tracepoint support
From: WangYuli <hidden>
Date: 2025-07-28 06:53:25
Also in:
linux-input, lkml
Attachments
- OpenPGP_signature.asc [application/pgp-signature] 236 bytes
From: WangYuli <hidden>
Date: 2025-07-28 06:53:25
Also in:
linux-input, lkml
Hi Steve, On 2025/7/23 08:25, Steven Rostedt wrote:
quoted
+ TP_STRUCT__entry(__string(name, dev->name ?: "unknown") __field( + unsigned int, type) __field(unsigned int, code) + __field(int, value) __field(u16, bustype) + __field(u16, vendor) + __field(u16, product)), +The contents of the tracepoints in the subsystems are determined by the subsystem maintainers, but please follow the tracepoint formatting. The above is horrible. It should look like a structure layout. One wouldn't write: struct entry { char *name; unsigned int type; unsigned int code; int value; u16 bustype; u16 vendor; u16 product; }; That's what the above looks like. It should be instead: TP_STRUCT__entry( __string( name, dev->name ?: "unknown" ) __field( unsigned int, type ) __field( unsigned int, code ) __field( int, value ) __field( u16, bustype ) __field( u16, vendor ) __field( u16, product ) ), So the fields can be easily visible and easily reviewed.
My apologies. Since this was a new file I added, I didn't carefully check it after applying clang-format, which led to this issue. I'll fix the code formatting and send a patch v2. -- WangYuli* *