Skip to content

Commit 98dbed7

Browse files
namhyungacmel
authored andcommitted
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 <[email protected]> Reviewed-by: Ian Rogers <[email protected]> Signed-off-by: Namhyung Kim <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Kan Liang <[email protected]> Cc: Peter Zijlstra <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 817af72 commit 98dbed7

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

tools/perf/util/tool_pmu.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,6 @@ int evsel__tool_pmu_open(struct evsel *evsel,
239239
nthreads = perf_thread_map__nr(threads);
240240
for (idx = start_cpu_map_idx; idx < end_cpu_map_idx; idx++) {
241241
for (thread = 0; thread < nthreads; thread++) {
242-
if (thread >= nthreads)
243-
break;
244-
245242
if (!evsel->cgrp && !evsel->core.system_wide)
246243
pid = perf_thread_map__pid(threads, thread);
247244

0 commit comments

Comments
 (0)