Re: [PATCH v1 3/6] tracing: Mark binary printing functions with __printf() attribute
From: Steven Rostedt
Date: Mon Mar 24 2025 - 12:02:08 EST
On Thu, 20 Mar 2025 20:04:24 +0200
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> @@ -113,7 +113,8 @@ static inline __printf(2, 3)
> void trace_seq_printf(struct trace_seq *s, const char *fmt, ...)
> {
> }
> -static inline void
> +static inline __printf(2, 0)
> +void
> trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary)
> {
> }
Do we need to split the line after the __printf()? Can't the above be:
static inline __printf(2, 0) void
trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary)
Or even:
__printf(2, 0)
static inline void
trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary)
I rather not split the prefix elements of a function over two lines. I
rather not even split them from the function itself, but tend to do that if
space is needed.
-- Steve