From 75016ca3acd0de79868ef5b0694195fe05288ade Mon Sep 17 00:00:00 2001 From: Daniel Bristot de Oliveira Date: Wed, 2 Mar 2022 20:01:40 +0100 Subject: rtla: Tools main loop cleanup I probably started using "do {} while();", but changed all but osnoise_top to "while(){};" leaving the ; behind. Cleanup the main loop code, making all tools use "while() {}" Changcheng Deng reported this problem, as reported by coccicheck: Fix the following coccicheck review: ./tools/tracing/rtla/src/timerlat_hist.c: 800: 2-3: Unneeded semicolon ./tools/tracing/rtla/src/osnoise_hist.c: 776: 2-3: Unneeded semicolon ./tools/tracing/rtla/src/timerlat_top.c: 596: 2-3: Unneeded semicolon Link: https://lkml.kernel.org/r/3c1642110aa87c396f5da4a037dabc72dbb9c601.1646247211.git.bristot@kernel.org Cc: Daniel Bristot de Oliveira Cc: Clark Williams Cc: Juri Lelli Cc: Jonathan Corbet Reported-by: Changcheng Deng Reported-by: Zeal Robot Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) --- tools/tracing/rtla/src/osnoise_top.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/tracing/rtla/src/osnoise_top.c') diff --git a/tools/tracing/rtla/src/osnoise_top.c b/tools/tracing/rtla/src/osnoise_top.c index fd29a4049322..72c2fd6ce005 100644 --- a/tools/tracing/rtla/src/osnoise_top.c +++ b/tools/tracing/rtla/src/osnoise_top.c @@ -612,7 +612,7 @@ int osnoise_top_main(int argc, char **argv) tool->start_time = time(NULL); osnoise_top_set_signals(params); - do { + while (!stop_tracing) { sleep(params->sleep_time); retval = tracefs_iterate_raw_events(trace->tep, @@ -632,7 +632,7 @@ int osnoise_top_main(int argc, char **argv) if (trace_is_off(&tool->trace, &record->trace)) break; - } while (!stop_tracing); + } osnoise_print_stats(params, tool); -- cgit v1.2.3