diff mbox series

[-next] perf kwork top: Simplify bool conversion

Message ID 20230915063832.120274-1-yang.lee@linux.alibaba.com (mailing list archive)
State Not Applicable
Headers show
Series [-next] perf kwork top: Simplify bool conversion | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Yang Li Sept. 15, 2023, 6:38 a.m. UTC
./tools/perf/util/bpf_kwork_top.c:120:53-58: WARNING: conversion to bool not needed here

Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 tools/perf/util/bpf_kwork_top.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Namhyung Kim Sept. 21, 2023, 6:49 p.m. UTC | #1
On Thu, Sep 14, 2023 at 11:38 PM Yang Li <yang.lee@linux.alibaba.com> wrote:
>
> ./tools/perf/util/bpf_kwork_top.c:120:53-58: WARNING: conversion to bool not needed here
>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>

Applied to perf-tools-next, thanks!
diff mbox series

Patch

diff --git a/tools/perf/util/bpf_kwork_top.c b/tools/perf/util/bpf_kwork_top.c
index 1a607b94f44d..035e02272790 100644
--- a/tools/perf/util/bpf_kwork_top.c
+++ b/tools/perf/util/bpf_kwork_top.c
@@ -117,7 +117,7 @@  kwork_class_bpf_supported_list[KWORK_CLASS_MAX] = {
 
 static bool valid_kwork_class_type(enum kwork_class_type type)
 {
-	return type >= 0 && type < KWORK_CLASS_MAX ? true : false;
+	return type >= 0 && type < KWORK_CLASS_MAX;
 }
 
 static int setup_filters(struct perf_kwork *kwork)