lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 13 Sep 2017 00:44:52 -0700 From: tip-bot for Jiri Olsa <tipbot@...or.com> To: linux-tip-commits@...r.kernel.org Cc: acme@...hat.com, linux-kernel@...r.kernel.org, namhyung@...nel.org, tglx@...utronix.de, hpa@...or.com, mingo@...nel.org, dsahern@...il.com, a.p.zijlstra@...llo.nl, jolsa@...nel.org Subject: [tip:perf/urgent] perf ui progress: Make sure we always define step value Commit-ID: 4d286c89e412fc2eaa1b8988481d2f32b5e3826f Gitweb: http://git.kernel.org/tip/4d286c89e412fc2eaa1b8988481d2f32b5e3826f Author: Jiri Olsa <jolsa@...nel.org> AuthorDate: Fri, 8 Sep 2017 14:05:07 +0200 Committer: Arnaldo Carvalho de Melo <acme@...hat.com> CommitDate: Tue, 12 Sep 2017 12:34:46 -0300 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@...nel.org> Cc: David Ahern <dsahern@...il.com> Cc: Namhyung Kim <namhyung@...nel.org> Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl> Link: http://lkml.kernel.org/r/20170908120510.22515-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com> --- tools/perf/ui/progress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/ui/progress.c b/tools/perf/ui/progress.c index a0f24c7..a9c1580 100644 --- a/tools/perf/ui/progress.c +++ b/tools/perf/ui/progress.c @@ -25,7 +25,7 @@ void ui_progress__update(struct ui_progress *p, u64 adv) void ui_progress__init(struct ui_progress *p, u64 total, const char *title) { p->curr = 0; - p->next = p->step = total / 16; + p->next = p->step = total / 16 ?: 1; p->total = total; p->title = title;
Powered by blists - more mailing lists