linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf timechart: Remove redundant variable assignment
@ 2024-11-11  9:52 Luo Yifan
  2024-11-11 17:41 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 2+ messages in thread
From: Luo Yifan @ 2024-11-11  9:52 UTC (permalink / raw)
  To: peterz, mingo, acme, namhyung, mark.rutland, alexander.shishkin,
	jolsa, irogers, adrian.hunter, kan.liang
  Cc: linux-perf-users, linux-kernel, Luo Yifan

This patch makes a minor change that removes a redundant variable
assignment. The assignment before the for loop is duplicated by the
initialization within the loop header.

Signed-off-by: Luo Yifan <luoyifan@cmss.chinamobile.com>
---
 tools/perf/builtin-timechart.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c
index 218c8b44d..8388e0d81 100644
--- a/tools/perf/builtin-timechart.c
+++ b/tools/perf/builtin-timechart.c
@@ -1158,7 +1158,6 @@ static void draw_io_bars(struct timechart *tchart)
 			}
 
 			svg_box(Y, c->start_time, c->end_time, "process3");
-			sample = c->io_samples;
 			for (sample = c->io_samples; sample; sample = sample->next) {
 				double h = (double)sample->bytes / c->max_bytes;
 
-- 
2.27.0




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

* Re: [PATCH] perf timechart: Remove redundant variable assignment
  2024-11-11  9:52 [PATCH] perf timechart: Remove redundant variable assignment Luo Yifan
@ 2024-11-11 17:41 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2024-11-11 17:41 UTC (permalink / raw)
  To: Luo Yifan
  Cc: peterz, mingo, namhyung, mark.rutland, alexander.shishkin, jolsa,
	irogers, adrian.hunter, kan.liang, linux-perf-users, linux-kernel

On Mon, Nov 11, 2024 at 05:52:09PM +0800, Luo Yifan wrote:
> This patch makes a minor change that removes a redundant variable
> assignment. The assignment before the for loop is duplicated by the
> initialization within the loop header.
> 
> Signed-off-by: Luo Yifan <luoyifan@cmss.chinamobile.com>

Thanks, applied to perf-tools-next,

- Arnaldo
> ---
>  tools/perf/builtin-timechart.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c
> index 218c8b44d..8388e0d81 100644
> --- a/tools/perf/builtin-timechart.c
> +++ b/tools/perf/builtin-timechart.c
> @@ -1158,7 +1158,6 @@ static void draw_io_bars(struct timechart *tchart)
>  			}
>  
>  			svg_box(Y, c->start_time, c->end_time, "process3");
> -			sample = c->io_samples;
>  			for (sample = c->io_samples; sample; sample = sample->next) {
>  				double h = (double)sample->bytes / c->max_bytes;
>  
> -- 
> 2.27.0
> 
> 

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

end of thread, other threads:[~2024-11-11 17:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-11  9:52 [PATCH] perf timechart: Remove redundant variable assignment Luo Yifan
2024-11-11 17:41 ` Arnaldo Carvalho de Melo

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).