Re: [PATCH 2/2] Use num_possible_cpus() instead of direct use of NR_CPUS.

From: Peter Zijlstra
Date: Mon Jan 11 2016 - 17:14:45 EST


On Mon, Jan 11, 2016 at 02:46:22PM +0100, Vlastimil Babka wrote:
> On 01/10/2016 04:13 PM, Ameen wrote:
> > WARNING: usage of NR_CPUS is often wrong - consider using cpu_possible(), num_possible_cpus()..
>
> Is that a checkpatch warning? Notice the word "often". You need to provide info
> why it's the case here (and I doubt the change will be corect in this case).

Yeah, this is terminally broken.