From: Namhyung Kim <namhyung@kernel.org>
To: David Binderman <dcb314@hotmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
"acme@kernel.org" <acme@kernel.org>,
"mark.rutland@arm.com" <mark.rutland@arm.com>,
"alexander.shishkin@linux.intel.com"
<alexander.shishkin@linux.intel.com>,
"jolsa@kernel.org" <jolsa@kernel.org>,
"irogers@google.com" <irogers@google.com>,
"adrian.hunter@intel.com" <adrian.hunter@intel.com>,
"kan.liang@linux.intel.com" <kan.liang@linux.intel.com>,
"linux-perf-users@vger.kernel.org"
<linux-perf-users@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: linux-6.16/tools/perf/util/tool_pmu.c:242: Pointless test ?
Date: Wed, 6 Aug 2025 16:12:13 -0700 [thread overview]
Message-ID: <aJPhTRz8B8jIjjov@google.com> (raw)
In-Reply-To: <AS8PR02MB10217286997CFA78F802121F39C2DA@AS8PR02MB10217.eurprd02.prod.outlook.com>
Hello,
On Wed, Aug 06, 2025 at 06:09:40AM +0000, David Binderman wrote:
> Hello there,
>
> 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;
>
> Suggest remove if test.
Thanks for the report. Do you want us to remove or will you send a
patch? It'd be great if you can send one.
Thanks,
Namhyung
next prev parent reply other threads:[~2025-08-06 23:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-06 6:09 linux-6.16/tools/perf/util/tool_pmu.c:242: Pointless test ? David Binderman
2025-08-06 23:12 ` Namhyung Kim [this message]
2025-08-07 5:24 ` David Binderman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aJPhTRz8B8jIjjov@google.com \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=dcb314@hotmail.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox