[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20241118043939.270819-1-guanjing@cmss.chinamobile.com>
Date: Mon, 18 Nov 2024 12:39:39 +0800
From: guanjing <guanjing@...s.chinamobile.com>
To: peterz@...radead.org,
mingo@...hat.com,
acme@...nel.org,
namhyung@...nel.org,
mark.rutland@....com,
alexander.shishkin@...ux.intel.com,
jolsa@...nel.org,
irogers@...gle.com,
adrian.hunter@...el.com,
kan.liang@...ux.intel.com,
james.clark@...aro.org,
yangjihong1@...wei.com
Cc: linux-perf-users@...r.kernel.org,
linux-kernel@...r.kernel.org,
bpf@...r.kernel.org,
guanjing <guanjing@...s.chinamobile.com>
Subject: [PATCH v2] perf kwork: Fix unnecessary conversion to bool in 'valid_kwork_class_type'
Fixes the following coccicheck:
tools/perf/util/bpf_kwork.c:145:53-58: WARNING: conversion to bool not needed here
Fixes: daf07d220710 ("perf kwork: Implement BPF trace")
Signed-off-by: guanjing <guanjing@...s.chinamobile.com>
---
tools/perf/util/bpf_kwork.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/bpf_kwork.c b/tools/perf/util/bpf_kwork.c
index 6c7126b7670d..c71461082683 100644
--- a/tools/perf/util/bpf_kwork.c
+++ b/tools/perf/util/bpf_kwork.c
@@ -142,7 +142,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)
--
2.33.0
Powered by blists - more mailing lists