2023-01-31 06:19:43

by Yang Li

[permalink] [raw]
Subject: [PATCH -next] tracing: clean up some inconsistent indentings

kernel/trace/trace_events_synth.c:567 trace_event_raw_event_synth() warn: inconsistent indenting

Reported-by: Abaci Robot <[email protected]>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3892
Signed-off-by: Yang Li <[email protected]>
---
kernel/trace/trace_events_synth.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/trace/trace_events_synth.c b/kernel/trace/trace_events_synth.c
index adb630633f31..949d4cbe3f82 100644
--- a/kernel/trace/trace_events_synth.c
+++ b/kernel/trace/trace_events_synth.c
@@ -564,7 +564,8 @@ static notrace void trace_event_raw_event_synth(void *__data,
event->fields[i]->is_dynamic,
data_size, &n_u64);
data_size += len; /* only dynamic string increments */
- } if (event->fields[i]->is_stack) {
+ }
+ if (event->fields[i]->is_stack) {
long *stack = (long *)(long)var_ref_vals[val_idx];

len = trace_stack(entry, event, stack,
--
2.20.1.7.g153144c



2023-01-31 14:46:20

by Steven Rostedt

[permalink] [raw]
Subject: Re: [PATCH -next] tracing: clean up some inconsistent indentings

On Tue, 31 Jan 2023 14:19:35 +0800
Yang Li <[email protected]> wrote:

> kernel/trace/trace_events_synth.c:567 trace_event_raw_event_synth() warn: inconsistent indenting
>

NACK!

This just removes the warning and hence it hides the bug!

This was already reported by kernel test robot:
https://lore.kernel.org/all/[email protected]/

I have a fix but haven't posted it yet.

-- Steve

> Reported-by: Abaci Robot <[email protected]>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3892
> Signed-off-by: Yang Li <[email protected]>
> ---
> kernel/trace/trace_events_synth.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/trace/trace_events_synth.c b/kernel/trace/trace_events_synth.c
> index adb630633f31..949d4cbe3f82 100644
> --- a/kernel/trace/trace_events_synth.c
> +++ b/kernel/trace/trace_events_synth.c
> @@ -564,7 +564,8 @@ static notrace void trace_event_raw_event_synth(void *__data,
> event->fields[i]->is_dynamic,
> data_size, &n_u64);
> data_size += len; /* only dynamic string increments */
> - } if (event->fields[i]->is_stack) {
> + }
> + if (event->fields[i]->is_stack) {
> long *stack = (long *)(long)var_ref_vals[val_idx];
>
> len = trace_stack(entry, event, stack,