Skip to contentSkip to conversation

perf kwork top: Simplify bool conversion

PATCH Applied Yang Li 2 participants 2 messages Sep 15, 2023 – Sep 21, 2023

Subsystems (2)
lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 perf kwork top: Simplify bool conversion

./tools/perf/util/bpf_kwork_top.c:120:53-58: WARNING: conversion to bool not needed here

---
 tools/perf/util/bpf_kwork_top.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/bpf_kwork_top.c +1 -1
index 1a607b94f44d..035e02272790 100644
@@ -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)
Signature · 1 line
2.20.1.7.g153144c
maintainer Applied
#1 lore raw
Quoted 4 lines · Yang Li

./tools/perf/util/bpf_kwork_top.c:120:53-58: WARNING: conversion to bool not needed here

Applied to perf-tools-next, thanks!