lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 09 Oct 2017 16:01:48 +1100
From:   Michael Ellerman <mpe@...erman.id.au>
To:     David Binderman <dcb314@...mail.com>,
        "benh\@kernel.crashing.org" <benh@...nel.crashing.org>,
        "paulus\@samba.org" <paulus@...ba.org>,
        "linuxppc-dev\@lists.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
        "linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>,
        anju@...ux.vnet.ibm.com
Subject: Re: linux-4.14-rc3/arch/powerpc/perf/imc-pmu.c:599: pointless test ?

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.

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ