Commit 75016ca3 authored by Daniel Bristot de Oliveira's avatar Daniel Bristot de Oliveira Committed by Steven Rostedt (Google)

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 <bristot@kernel.org>
Cc: Clark Williams <williams@redhat.com>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Reported-by: default avatarChangcheng Deng <deng.changcheng@zte.com.cn>
Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarDaniel Bristot de Oliveira <bristot@kernel.org>
Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
parent 7d0dc957
...@@ -850,7 +850,7 @@ int osnoise_hist_main(int argc, char *argv[]) ...@@ -850,7 +850,7 @@ int osnoise_hist_main(int argc, char *argv[])
if (trace_is_off(&tool->trace, &record->trace)) if (trace_is_off(&tool->trace, &record->trace))
break; break;
}; }
osnoise_read_trace_hist(tool); osnoise_read_trace_hist(tool);
......
...@@ -612,7 +612,7 @@ int osnoise_top_main(int argc, char **argv) ...@@ -612,7 +612,7 @@ int osnoise_top_main(int argc, char **argv)
tool->start_time = time(NULL); tool->start_time = time(NULL);
osnoise_top_set_signals(params); osnoise_top_set_signals(params);
do { while (!stop_tracing) {
sleep(params->sleep_time); sleep(params->sleep_time);
retval = tracefs_iterate_raw_events(trace->tep, retval = tracefs_iterate_raw_events(trace->tep,
...@@ -632,7 +632,7 @@ int osnoise_top_main(int argc, char **argv) ...@@ -632,7 +632,7 @@ int osnoise_top_main(int argc, char **argv)
if (trace_is_off(&tool->trace, &record->trace)) if (trace_is_off(&tool->trace, &record->trace))
break; break;
} while (!stop_tracing); }
osnoise_print_stats(params, tool); osnoise_print_stats(params, tool);
......
...@@ -885,7 +885,7 @@ int timerlat_hist_main(int argc, char *argv[]) ...@@ -885,7 +885,7 @@ int timerlat_hist_main(int argc, char *argv[])
if (trace_is_off(&tool->trace, &record->trace)) if (trace_is_off(&tool->trace, &record->trace))
break; break;
}; }
timerlat_print_stats(params, tool); timerlat_print_stats(params, tool);
......
...@@ -680,7 +680,7 @@ int timerlat_top_main(int argc, char *argv[]) ...@@ -680,7 +680,7 @@ int timerlat_top_main(int argc, char *argv[])
if (trace_is_off(&top->trace, &record->trace)) if (trace_is_off(&top->trace, &record->trace))
break; break;
}; }
timerlat_print_stats(params, top); timerlat_print_stats(params, top);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment