From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@redhat.com>,
Daniel Bristot de Oliveira <bristot@redhat.com>,
Dan Carpenter <dan.carpenter@oracle.com>
Subject: [for-next][PATCH 3/5] trace/timerlat: Fix indentation on timerlat_main()
Date: Wed, 30 Jun 2021 19:18:01 -0400 [thread overview]
Message-ID: <20210630231822.405224806@goodmis.org> (raw)
In-Reply-To: <20210630231758.861158022@goodmis.org>
From: Daniel Bristot de Oliveira <bristot@redhat.com>
Dan Carpenter reported that:
The patch a955d7eac177: "trace: Add timerlat tracer" from Jun 22,
2021, leads to the following static checker warning:
kernel/trace/trace_osnoise.c:1400 timerlat_main()
warn: inconsistent indenting
here:
1389 while (!kthread_should_stop()) {
1390 now = ktime_to_ns(hrtimer_cb_get_time(&tlat->timer));
1391 diff = now - tlat->abs_period;
1392
1393 s.seqnum = tlat->count;
1394 s.timer_latency = diff;
1395 s.context = THREAD_CONTEXT;
1396
1397 trace_timerlat_sample(&s);
1398
1399 #ifdef CONFIG_STACKTRACE
1400 if (osnoise_data.print_stack)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This should be indented another tab?
1401 if (osnoise_data.print_stack <= time_to_us(diff))
1402 timerlat_dump_stack();
1403 #endif /* CONFIG_STACKTRACE */
1404
1405 tlat->tracing_thread = false;
1406 if (osnoise_data.stop_tracing_total)
1407 if (time_to_us(diff) >= osnoise_data.stop_tracing_total)
1408 osnoise_stop_tracing();
1409
1410 wait_next_period(tlat);
1411 }
And the static checker is right. Fix the indentation.
Link: https://lkml.kernel.org/r/3d5d8c9258fbdcfa9d3c7362941b3d13a2a28d9d.1624986368.git.bristot@redhat.com
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Daniel Bristot de Oliveira <bristot@redhat.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-kernel@vger.kernel.org
Fixes: a955d7eac177 ("trace: Add timerlat tracer")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Daniel Bristot de Oliveira <bristot@redhat.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
kernel/trace/trace_osnoise.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c
index cc1faca1a620..a7e3c24dee13 100644
--- a/kernel/trace/trace_osnoise.c
+++ b/kernel/trace/trace_osnoise.c
@@ -1403,9 +1403,9 @@ static int timerlat_main(void *data)
trace_timerlat_sample(&s);
#ifdef CONFIG_STACKTRACE
- if (osnoise_data.print_stack)
- if (osnoise_data.print_stack <= time_to_us(diff))
- timerlat_dump_stack();
+ if (osnoise_data.print_stack)
+ if (osnoise_data.print_stack <= time_to_us(diff))
+ timerlat_dump_stack();
#endif /* CONFIG_STACKTRACE */
tlat->tracing_thread = false;
--
2.30.2
next prev parent reply other threads:[~2021-06-30 23:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-30 23:17 [for-next][PATCH 0/5] tracing: A few more fixes before sending to 5.14 Steven Rostedt
2021-06-30 23:17 ` [for-next][PATCH 1/5] tracepoint: Add tracepoint_probe_register_may_exist() for BPF tracing Steven Rostedt
2021-06-30 23:18 ` [for-next][PATCH 2/5] trace/osnoise: Make noise variable s64 in run_osnoise() Steven Rostedt
2021-06-30 23:18 ` Steven Rostedt [this message]
2021-06-30 23:18 ` [for-next][PATCH 4/5] tracing: Change variable type as bool for clean-up Steven Rostedt
2021-06-30 23:18 ` [for-next][PATCH 5/5] treewide: Add missing semicolons to __assign_str uses Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210630231822.405224806@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=bristot@redhat.com \
--cc=dan.carpenter@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®