Re: [PATCH] perf timechart: Remove redundant variable assignment

From: Arnaldo Carvalho de Melo
Date: Mon Nov 11 2024 - 12:43:18 EST


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@xxxxxxxxxxxxxxxxxxxx>

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