From: Michael Ellerman <mpe@ellerman.id.au>
To: David Binderman <dcb314@hotmail.com>,
"benh\@kernel.crashing.org" <benh@kernel.crashing.org>,
"paulus\@samba.org" <paulus@samba.org>,
"linuxppc-dev\@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
anju@linux.vnet.ibm.com
Subject: Re: linux-4.14-rc3/arch/powerpc/perf/imc-pmu.c:599: pointless test ?
Date: Mon, 09 Oct 2017 16:01:48 +1100 [thread overview]
Message-ID: <87fuasewxv.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <HE1PR0802MB23316FCA14FD1F8E51FCAB059C710@HE1PR0802MB2331.eurprd08.prod.outlook.com>
David Binderman <dcb314@hotmail.com> writes:
> Hello there,
>
> linux-4.14-rc3/arch/powerpc/perf/imc-pmu.c:599]: (style) Unsigned variable 'ncpu' can't be negative so it is unnecessary to test it.
>
> Source code is
>
> if (ncpu >= 0 && ncpu < nr_cpu_ids) {
>
> but
>
> unsigned int ncpu, core_id;
>
> Suggest remove test.
Thanks.
Notifying the author would be more helpful:
$ git blame -L 599,599 arch/powerpc/perf/imc-pmu.c
39a846db1d574 (Anju T Sudhakar 2017-07-19 03:06:35 +0530 599) if (ncpu >= 0 && ncpu < nr_cpu_ids) {
$ git log -1 --format=%ae 39a846db1d574
anju@linux.vnet.ibm.com
cheers
next parent reply other threads:[~2017-10-09 5:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <HE1PR0802MB23316FCA14FD1F8E51FCAB059C710@HE1PR0802MB2331.eurprd08.prod.outlook.com>
2017-10-09 5:01 ` Michael Ellerman [this message]
2017-10-09 11:38 ` Anju T Sudhakar
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=87fuasewxv.fsf@concordia.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=anju@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=dcb314@hotmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.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
all inboxes | Powered by JetHome®