]> git.baikalelectronics.ru Git - kernel.git/commit
perf ui progress: Make sure we always define step value
authorJiri Olsa <jolsa@kernel.org>
Fri, 8 Sep 2017 12:05:07 +0000 (14:05 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 12 Sep 2017 15:34:46 +0000 (12:34 -0300)
commit4d286c89e412fc2eaa1b8988481d2f32b5e3826f
tree84bbfd172257b0a4fb79f798d193627eb7ccd7bb
parentcd6379ebb55ae53e77f17e22ce830bf3fe826736
perf ui progress: Make sure we always define step value

Unlikely, but we could have ui_progress__init being called with total <
16, which would set the next and step variables to 0. That would force
unnecessary ui_progress__ops->update calls because 'next' would never
raise.

Forcing the next and step values to be always > 0.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20170908120510.22515-2-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/ui/progress.c