mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: linux-4.14-rc3/arch/powerpc/perf/imc-pmu.c:599: pointless test ?
       [not found] <HE1PR0802MB23316FCA14FD1F8E51FCAB059C710@HE1PR0802MB2331.eurprd08.prod.outlook.com>
@ 2017-10-09  5:01 ` Michael Ellerman
  2017-10-09 11:38   ` Anju T Sudhakar
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Ellerman @ 2017-10-09  5:01 UTC (permalink / raw)
  To: David Binderman, benh, paulus, linuxppc-dev, linux-kernel, anju

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: linux-4.14-rc3/arch/powerpc/perf/imc-pmu.c:599: pointless test ?
  2017-10-09  5:01 ` linux-4.14-rc3/arch/powerpc/perf/imc-pmu.c:599: pointless test ? Michael Ellerman
@ 2017-10-09 11:38   ` Anju T Sudhakar
  0 siblings, 0 replies; 2+ messages in thread
From: Anju T Sudhakar @ 2017-10-09 11:38 UTC (permalink / raw)
  To: Michael Ellerman, David Binderman, benh, paulus, linuxppc-dev,
	linux-kernel

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
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-09 11:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <HE1PR0802MB23316FCA14FD1F8E51FCAB059C710@HE1PR0802MB2331.eurprd08.prod.outlook.com>
2017-10-09  5:01 ` linux-4.14-rc3/arch/powerpc/perf/imc-pmu.c:599: pointless test ? Michael Ellerman
2017-10-09 11:38   ` Anju T Sudhakar

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®