2020-04-26 12:36:47

by Zou Wei

[permalink] [raw]
Subject: [PATCH -next] perf report: fix warning Comparison of 0/1 to bool variable

Fixes coccicheck warning:

tools/perf/builtin-report.c:1403:2-34: WARNING: Assignment of 0/1 to bool variable

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Zou Wei <[email protected]>
---
tools/perf/builtin-report.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 26d8fc2..02c09fd 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -1400,7 +1400,7 @@ int cmd_report(int argc, const char **argv)
}
if (branch_call_mode) {
callchain_param.key = CCKEY_ADDRESS;
- callchain_param.branch_callstack = 1;
+ callchain_param.branch_callstack = true;
symbol_conf.use_callchain = true;
callchain_register_param(&callchain_param);
if (sort_order == NULL)
--
2.6.2


2020-04-28 17:55:14

by Arnaldo Carvalho de Melo

[permalink] [raw]
Subject: Re: [PATCH -next] perf report: fix warning Comparison of 0/1 to bool variable

Em Sun, Apr 26, 2020 at 08:38:03PM +0800, Zou Wei escreveu:
> Fixes coccicheck warning:
>
> tools/perf/builtin-report.c:1403:2-34: WARNING: Assignment of 0/1 to bool variable


Fixed the subject line to have "assignment", not "comparison",

Thanks, applied,

- Arnaldo

2020-05-08 13:07:54

by tip-bot2 for Tony Luck

[permalink] [raw]
Subject: [tip: perf/core] perf report: Fix warning assignment of 0/1 to bool variable

The following commit has been merged into the perf/core branch of tip:

Commit-ID: 6fa9c3e779b89612c56f8ee0096b2252d906357a
Gitweb: https://git.kernel.org/tip/6fa9c3e779b89612c56f8ee0096b2252d906357a
Author: Zou Wei <[email protected]>
AuthorDate: Sun, 26 Apr 2020 20:38:03 +08:00
Committer: Arnaldo Carvalho de Melo <[email protected]>
CommitterDate: Thu, 30 Apr 2020 10:48:33 -03:00

perf report: Fix warning assignment of 0/1 to bool variable

Fixes coccicheck warning:

tools/perf/builtin-report.c:1403:2-34: WARNING: Assignment of 0/1 to bool variable

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Zou Wei <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lore.kernel.org/lkml/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
---
tools/perf/builtin-report.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 0c32767..7da1342 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -1413,7 +1413,7 @@ repeat:
}
if (branch_call_mode) {
callchain_param.key = CCKEY_ADDRESS;
- callchain_param.branch_callstack = 1;
+ callchain_param.branch_callstack = true;
symbol_conf.use_callchain = true;
callchain_register_param(&callchain_param);
if (sort_order == NULL)