linux-4.14-rc3/arch/powerpc/perf/imc-pmu.c:599: pointless test ?

David Binderman dcb314 at hotmail.com
Sat Oct 7 05:54:56 AEDT 2017


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.

Regards

David Binderman


More information about the Linuxppc-dev mailing list