On Wed, 12 Nov 2025 14:17:05 +0900
Masami Hiramatsu (Google) <[email protected]> wrote:
> > #if defined(CONFIG_FUNCTION_GRAPH_RETVAL) ||
> > defined(CONFIG_FUNCTION_GRAPH_RETADDR)
> > @@ -869,10 +858,12 @@ static void print_graph_retval(struct trace_seq *s,
> > struct ftrace_graph_ent_entr
> > trace_seq_printf(s, "%ps", func);
> >
> > if (args_size >= FTRACE_REGS_MAX_ARGS * sizeof(long)) {
> > - print_function_args(s, entry->args, (unsigned
> > long)func);
> > + print_function_args(s, entry->args +
> > ARGS_OFFS(args_size),
> > + (unsigned long)func);
> > trace_seq_putc(s, ';');
> > - } else
> > + } else {
>
> nit: you don't need to add braces for a single line block.
>
> > trace_seq_puts(s, "();");
> > + }
> >
Actually you do.
The rule for if/else is if one side requires { }, then both do.
https://docs.kernel.org/process/coding-style.html#placing-braces-and-spaces
Yes, this has been inconsistent and my older code breaks this rule, but I
try to follow it in newer code.
-- Steve