public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Daniel Bristot de Oliveira <bristot@kernel.org>,
	Clark Williams <williams@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Changcheng Deng <deng.changcheng@zte.com.cn>,
	Zeal Robot <zealci@zte.com.cn>
Subject: [for-next][PATCH 15/15] rtla: Tools main loop cleanup
Date: Tue, 15 Mar 2022 15:02:29 -0400	[thread overview]
Message-ID: <20220315190245.457233873@goodmis.org> (raw)
In-Reply-To: 20220315190214.613102181@goodmis.org

From: Daniel Bristot de Oliveira <bristot@kernel.org>

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: Changcheng Deng <deng.changcheng@zte.com.cn>
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 tools/tracing/rtla/src/osnoise_hist.c  | 2 +-
 tools/tracing/rtla/src/osnoise_top.c   | 4 ++--
 tools/tracing/rtla/src/timerlat_hist.c | 2 +-
 tools/tracing/rtla/src/timerlat_top.c  | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/tracing/rtla/src/osnoise_hist.c b/tools/tracing/rtla/src/osnoise_hist.c
index c47780fedbaf..b4380d45cacd 100644
--- a/tools/tracing/rtla/src/osnoise_hist.c
+++ b/tools/tracing/rtla/src/osnoise_hist.c
@@ -850,7 +850,7 @@ int osnoise_hist_main(int argc, char *argv[])
 
 		if (trace_is_off(&tool->trace, &record->trace))
 			break;
-	};
+	}
 
 	osnoise_read_trace_hist(tool);
 
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);
 
diff --git a/tools/tracing/rtla/src/timerlat_hist.c b/tools/tracing/rtla/src/timerlat_hist.c
index 0f6ce80a198a..dc908126c610 100644
--- a/tools/tracing/rtla/src/timerlat_hist.c
+++ b/tools/tracing/rtla/src/timerlat_hist.c
@@ -885,7 +885,7 @@ int timerlat_hist_main(int argc, char *argv[])
 
 		if (trace_is_off(&tool->trace, &record->trace))
 			break;
-	};
+	}
 
 	timerlat_print_stats(params, tool);
 
diff --git a/tools/tracing/rtla/src/timerlat_top.c b/tools/tracing/rtla/src/timerlat_top.c
index 53f4cdfd395e..1f754c3df53f 100644
--- a/tools/tracing/rtla/src/timerlat_top.c
+++ b/tools/tracing/rtla/src/timerlat_top.c
@@ -680,7 +680,7 @@ int timerlat_top_main(int argc, char *argv[])
 		if (trace_is_off(&top->trace, &record->trace))
 			break;
 
-	};
+	}
 
 	timerlat_print_stats(params, top);
 
-- 
2.35.1

      parent reply	other threads:[~2022-03-15 19:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-15 19:02 [for-next][PATCH 00/15] rtla: Updates for 5.18 Steven Rostedt
2022-03-15 19:02 ` [for-next][PATCH 01/15] rtla/osnoise: Add support to adjust the tracing_thresh Steven Rostedt
2022-03-15 19:02 ` [for-next][PATCH 02/15] rtla/osnoise: Add an option to set the threshold Steven Rostedt
2022-03-15 19:02 ` [for-next][PATCH 03/15] rtla/osnoise: Add the automatic trace option Steven Rostedt
2022-03-15 19:02 ` [for-next][PATCH 04/15] rtla/timerlat: " Steven Rostedt
2022-03-15 19:02 ` [for-next][PATCH 05/15] rtla/trace: Add trace events helpers Steven Rostedt
2022-03-15 19:02 ` [for-next][PATCH 06/15] rtla: Add -e/--event support Steven Rostedt
2022-03-15 19:02 ` [for-next][PATCH 07/15] rtla/trace: Add trace event trigger helpers Steven Rostedt
2022-03-15 19:02 ` [for-next][PATCH 08/15] rtla: Add --trigger support Steven Rostedt
2022-03-15 19:02 ` [for-next][PATCH 09/15] rtla/trace: Add trace event filter helpers Steven Rostedt
2022-03-15 19:02 ` [for-next][PATCH 10/15] rtla: Add --filter support Steven Rostedt
2022-03-15 19:02 ` [for-next][PATCH 11/15] rtla/trace: Save event histogram output to a file Steven Rostedt
2022-03-15 19:02 ` [for-next][PATCH 12/15] rtla: Check for trace off also in the trace instance Steven Rostedt
2022-03-15 19:02 ` [for-next][PATCH 13/15] rtla/osnoise: Fix osnoise hist stop tracing message Steven Rostedt
2022-03-15 19:02 ` [for-next][PATCH 14/15] rtla/timerlat: Add --dma-latency option Steven Rostedt
2022-03-15 19:02 ` Steven Rostedt [this message]

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=20220315190245.457233873@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=bristot@kernel.org \
    --cc=corbet@lwn.net \
    --cc=deng.changcheng@zte.com.cn \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=williams@redhat.com \
    --cc=zealci@zte.com.cn \
    /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