[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <d6d7ee9b-9c8e-5d1c-d60e-c92457a4cd44@linux.vnet.ibm.com>
Date: Mon, 9 Oct 2017 17:08:47 +0530
From: Anju T Sudhakar <anju@...ux.vnet.ibm.com>
To: Michael Ellerman <mpe@...erman.id.au>,
David Binderman <dcb314@...mail.com>,
"benh@...nel.crashing.org" <benh@...nel.crashing.org>,
"paulus@...ba.org" <paulus@...ba.org>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: linux-4.14-rc3/arch/powerpc/perf/imc-pmu.c:599: pointless test ?
Hi David,
On Monday 09 October 2017 10:31 AM, Michael Ellerman wrote:
> David Binderman <dcb314@...mail.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@...ux.vnet.ibm.com
>
> cheers
>
Powered by blists - more mailing lists