public inbox for linux-trace-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tracing: Fix indentation of return statement in print_trace_fmt()
@ 2026-01-29  1:39 Haoyang LIU
  2026-01-29  2:29 ` Masami Hiramatsu
  0 siblings, 1 reply; 3+ messages in thread
From: Haoyang LIU @ 2026-01-29  1:39 UTC (permalink / raw)
  To: Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
	open list:TRACING, open list:TRACING
  Cc: tttturtleruss, open list:TRACING, open list:TRACING

The return statement inside the nested if block in print_trace_fmt()
is not properly indented, making the code structure unclear. This was
flagged by smatch as a warning.

Add proper indentation to the return statement to match the kernel
coding style and improve readability.

Signed-off-by: Haoyang LIU <tttturtleruss@gmail.com>
---
 kernel/trace/trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 8bd4ec08fb36..bf0ce2aac177 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -4286,7 +4286,7 @@ static enum print_line_t print_trace_fmt(struct trace_iterator *iter)
 			/* ftrace and system call events are still OK */
 			if ((event->type > __TRACE_LAST_TYPE) &&
 			    !is_syscall_event(event))
-			return print_event_fields(iter, event);
+				return print_event_fields(iter, event);
 		}
 		return event->funcs->trace(iter, sym_flags, event);
 	}
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] tracing: Fix indentation of return statement in print_trace_fmt()
  2026-01-29  1:39 Haoyang LIU
@ 2026-01-29  2:29 ` Masami Hiramatsu
  0 siblings, 0 replies; 3+ messages in thread
From: Masami Hiramatsu @ 2026-01-29  2:29 UTC (permalink / raw)
  To: Haoyang LIU
  Cc: Steven Rostedt, Mathieu Desnoyers, open list:TRACING,
	open list:TRACING

On Thu, 29 Jan 2026 09:39:54 +0800
Haoyang LIU <tttturtleruss@gmail.com> wrote:

> The return statement inside the nested if block in print_trace_fmt()
> is not properly indented, making the code structure unclear. This was
> flagged by smatch as a warning.
> 
> Add proper indentation to the return statement to match the kernel
> coding style and improve readability.
> 
> Signed-off-by: Haoyang LIU <tttturtleruss@gmail.com>

Looks good to me.

Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>

Thanks,

> ---
>  kernel/trace/trace.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index 8bd4ec08fb36..bf0ce2aac177 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -4286,7 +4286,7 @@ static enum print_line_t print_trace_fmt(struct trace_iterator *iter)
>  			/* ftrace and system call events are still OK */
>  			if ((event->type > __TRACE_LAST_TYPE) &&
>  			    !is_syscall_event(event))
> -			return print_event_fields(iter, event);
> +				return print_event_fields(iter, event);
>  		}
>  		return event->funcs->trace(iter, sym_flags, event);
>  	}
> -- 
> 2.25.1
> 


-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] tracing: Fix indentation of return statement in print_trace_fmt()
@ 2026-02-10 15:39 Haoyang LIU
  0 siblings, 0 replies; 3+ messages in thread
From: Haoyang LIU @ 2026-02-10 15:39 UTC (permalink / raw)
  To: Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
	open list:TRACING, open list:TRACING
  Cc: tttturtleruss, open list:TRACING, open list:TRACING

The return statement inside the nested if block in print_trace_fmt()
is not properly indented, making the code structure unclear. This was
flagged by smatch as a warning.

Add proper indentation to the return statement to match the kernel
coding style and improve readability.

Signed-off-by: Haoyang LIU <tttturtleruss@gmail.com>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
---
 kernel/trace/trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 8bd4ec08fb36..bf0ce2aac177 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -4286,7 +4286,7 @@ static enum print_line_t print_trace_fmt(struct trace_iterator *iter)
 			/* ftrace and system call events are still OK */
 			if ((event->type > __TRACE_LAST_TYPE) &&
 			    !is_syscall_event(event))
-			return print_event_fields(iter, event);
+				return print_event_fields(iter, event);
 		}
 		return event->funcs->trace(iter, sym_flags, event);
 	}
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-02-10 15:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-10 15:39 [PATCH] tracing: Fix indentation of return statement in print_trace_fmt() Haoyang LIU
  -- strict thread matches above, loose matches on Subject: below --
2026-01-29  1:39 Haoyang LIU
2026-01-29  2:29 ` Masami Hiramatsu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox