aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2025-08-08 15:26:50 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2025-09-19 12:14:30 -0300
commit98dbed7aee7f8fd664927a6eea5fce15663be198 (patch)
tree82bd1d4077f83b9c8242575af1865e710b6c42c4 /tools/perf/util
parentperf tools: Update header documentation on BPF_PROG_INFO (diff)
downloadlinux-98dbed7aee7f8fd664927a6eea5fce15663be198.tar.gz
linux-98dbed7aee7f8fd664927a6eea5fce15663be198.zip
perf tools: Remove a pointless check
Static analyser cppcheck says: linux-6.16/tools/perf/util/tool_pmu.c:242:15: warning: Opposite inner 'if' condition leads to a dead code block. [oppositeInnerCondition] Source code is: for (thread = 0; thread < nthreads; thread++) { if (thread >= nthreads) break; Reported-by: David Binderman <dcb314@hotmail.com> Reviewed-by: Ian Rogers <irogers@google.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util')
-rw-r--r--tools/perf/util/tool_pmu.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/tools/perf/util/tool_pmu.c b/tools/perf/util/tool_pmu.c
index d99e699e646d..f075098488ba 100644
--- a/tools/perf/util/tool_pmu.c
+++ b/tools/perf/util/tool_pmu.c
@@ -239,9 +239,6 @@ int evsel__tool_pmu_open(struct evsel *evsel,
nthreads = perf_thread_map__nr(threads);
for (idx = start_cpu_map_idx; idx < end_cpu_map_idx; idx++) {
for (thread = 0; thread < nthreads; thread++) {
- if (thread >= nthreads)
- break;
-
if (!evsel->cgrp && !evsel->core.system_wide)
pid = perf_thread_map__pid(threads, thread);