linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tracing/tools: Remove unneeded semicolon
@ 2021-03-05  9:40 Xu Wang
  2021-03-05 10:42 ` Viktor.Rosendahl
  0 siblings, 1 reply; 3+ messages in thread
From: Xu Wang @ 2021-03-05  9:40 UTC (permalink / raw)
  To: rostedt, Viktor.Rosendahl, colin.king; +Cc: linux-kernel

fix semicolon.cocci warning:
tools/tracing/latency/latency-collector.c:1021:2-3: Unneeded semicolon

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
---
 tools/tracing/latency/latency-collector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/tracing/latency/latency-collector.c b/tools/tracing/latency/latency-collector.c
index b69de9263ee6..129fb00b70c2 100644
--- a/tools/tracing/latency/latency-collector.c
+++ b/tools/tracing/latency/latency-collector.c
@@ -1018,7 +1018,7 @@ static long go_to_sleep(const struct entry *req)
 		cond_timedwait(&printstate.cond, &printstate.mutex, &future);
 		if (time_has_passed(&future))
 			break;
-	};
+	}
 
 	if (printstate_has_new_req_arrived(req))
 		delay = -1;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] tracing/tools: Remove unneeded semicolon
  2021-03-05  9:40 [PATCH] tracing/tools: Remove unneeded semicolon Xu Wang
@ 2021-03-05 10:42 ` Viktor.Rosendahl
  2021-03-05 14:21   ` Steven Rostedt
  0 siblings, 1 reply; 3+ messages in thread
From: Viktor.Rosendahl @ 2021-03-05 10:42 UTC (permalink / raw)
  To: vulab; +Cc: rostedt, linux-kernel, colin.king

On Fri, 2021-03-05 at 09:40 +0000, Xu Wang wrote:
> fix semicolon.cocci warning:
> tools/tracing/latency/latency-collector.c:1021:2-3: Unneeded semicolon
> 
> Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
> ---
>  tools/tracing/latency/latency-collector.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/tracing/latency/latency-collector.c
> b/tools/tracing/latency/latency-collector.c
> index b69de9263ee6..129fb00b70c2 100644
> --- a/tools/tracing/latency/latency-collector.c
> +++ b/tools/tracing/latency/latency-collector.c
> @@ -1018,7 +1018,7 @@ static long go_to_sleep(const struct entry *req)
>  		cond_timedwait(&printstate.cond, &printstate.mutex, &future);
>  		if (time_has_passed(&future))
>  			break;
> -	};
> +	}
>  
>  	if (printstate_has_new_req_arrived(req))
>  		delay = -1;

Looks good but I would suggest to fix also the other instances of superfluous
semicolons with the same patch.

There seems to be a lonely semicolon on line 1944, i.e this code:

			if (value < 0) {
				warnx("TIME must be >= 0\n");
				show_usage();
				;
			}

In that case the lonely semicolon should be replaced with "exit(0);"

best regards,

Viktor

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] tracing/tools: Remove unneeded semicolon
  2021-03-05 10:42 ` Viktor.Rosendahl
@ 2021-03-05 14:21   ` Steven Rostedt
  0 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2021-03-05 14:21 UTC (permalink / raw)
  To: Viktor.Rosendahl; +Cc: vulab, linux-kernel, colin.king

On Fri, 5 Mar 2021 10:42:08 +0000
<Viktor.Rosendahl@bmw.de> wrote:

> Looks good but I would suggest to fix also the other instances of superfluous
> semicolons with the same patch.
> 
> There seems to be a lonely semicolon on line 1944, i.e this code:
> 
> 			if (value < 0) {
> 				warnx("TIME must be >= 0\n");
> 				show_usage();
> 				;
> 			}
> 
> In that case the lonely semicolon should be replaced with "exit(0);"

Agreed. I'll wait for v2 of the patch.

Thanks,

-- Steve

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-05 14:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-05  9:40 [PATCH] tracing/tools: Remove unneeded semicolon Xu Wang
2021-03-05 10:42 ` Viktor.Rosendahl
2021-03-05 14:21   ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).