* [PATCH] perf annotate: Remove unneeded conversion to bool
@ 2020-04-20 12:35 Jason Yan
2020-04-20 13:33 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 2+ messages in thread
From: Jason Yan @ 2020-04-20 12:35 UTC (permalink / raw)
To: peterz, mingo, acme, mark.rutland, alexander.shishkin, jolsa,
namhyung, linux-kernel
Cc: Jason Yan
The '>' expression itself is bool, no need to convert it to bool again.
This fixes the following coccicheck warning:
tools/perf/ui/browsers/annotate.c:212:30-35: WARNING: conversion to bool
not needed here
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
tools/perf/ui/browsers/annotate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index 9023267e5643..bd77825fd5a1 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -209,7 +209,7 @@ static void annotate_browser__draw_current_jump(struct ui_browser *browser)
ui_browser__mark_fused(browser,
pcnt_width + 3 + notes->widths.addr + width,
from - 1,
- to > from ? true : false);
+ to > from);
}
}
--
2.21.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] perf annotate: Remove unneeded conversion to bool
2020-04-20 12:35 [PATCH] perf annotate: Remove unneeded conversion to bool Jason Yan
@ 2020-04-20 13:33 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2020-04-20 13:33 UTC (permalink / raw)
To: Jason Yan
Cc: peterz, mingo, mark.rutland, alexander.shishkin, jolsa, namhyung,
linux-kernel
Em Mon, Apr 20, 2020 at 08:35:28PM +0800, Jason Yan escreveu:
> The '>' expression itself is bool, no need to convert it to bool again.
> This fixes the following coccicheck warning:
>
> tools/perf/ui/browsers/annotate.c:212:30-35: WARNING: conversion to bool
> not needed here
Thanks, applied.
- Arnaldo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-20 13:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-20 12:35 [PATCH] perf annotate: Remove unneeded conversion to bool Jason Yan
2020-04-20 13:33 ` Arnaldo Carvalho de Melo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.