From: Anju T Sudhakar <anju@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>,
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>
Subject: Re: linux-4.14-rc3/arch/powerpc/perf/imc-pmu.c:599: pointless test ?
Date: Mon, 9 Oct 2017 17:08:47 +0530 [thread overview]
Message-ID: <d6d7ee9b-9c8e-5d1c-d60e-c92457a4cd44@linux.vnet.ibm.com> (raw)
In-Reply-To: <87fuasewxv.fsf@concordia.ellerman.id.au>
Hi David,
On Monday 09 October 2017 10:31 AM, Michael Ellerman wrote:
> 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.
Nice catch. Thanks for mentioning this. I will fix this.
Thanks,
Anju
> 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
>
prev parent reply other threads:[~2017-10-09 11:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-06 18:54 linux-4.14-rc3/arch/powerpc/perf/imc-pmu.c:599: pointless test ? David Binderman
2017-10-09 5:01 ` Michael Ellerman
2017-10-09 11:38 ` Anju T Sudhakar [this message]
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=d6d7ee9b-9c8e-5d1c-d60e-c92457a4cd44@linux.vnet.ibm.com \
--to=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=mpe@ellerman.id.au \
--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;
as well as URLs for NNTP newsgroup(s).