mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 04:23:35 +02:00
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>
This commit is contained in:
parent
817af72c05
commit
98dbed7aee
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user