Re: [PATCH 05/16] staging/lustre: fix up obsolete cpu function usage.

2015-03-02 Thread Rusty Russell
Oleg Drokin writes: > So there are 7 more users like this outside of Lustre in the kernel then, > I'll try for a patch: I can squash these if you want... > ./drivers/scsi/hpsa.c:for (i = 0; i < num_online_cpus(); i++) { -- > this one seems to be just opencoding for_each_cpu, though Ye

Re: [PATCH 05/16] staging/lustre: fix up obsolete cpu function usage.

2015-03-02 Thread Oleg Drokin
On Mar 2, 2015, at 6:39 PM, Rusty Russell wrote: >> if (i == NR_CPUS) >>blah; >> >> when we are replacing for_each_cpu_mask with for_each_cpu, >> what do we check the counter against now to see that the entire loop was >> executed >> and we did not exit prematurely? nr_cpu_ids? > You want >=

Re: [PATCH 05/16] staging/lustre: fix up obsolete cpu function usage.

2015-03-02 Thread Rusty Russell
Oleg Drokin writes: > Thanks! > Seems there was a midair collsion with my own patch that was not as > comprehensive > wrt functions touched: https://lkml.org/lkml/2015/3/2/10 Yep, I posted this for completeness (and for your reference), but figured you'd handle it. > But on the other hand I als

Re: [PATCH 05/16] staging/lustre: fix up obsolete cpu function usage.

2015-03-02 Thread Oleg Drokin
Thanks! Seems there was a midair collsion with my own patch that was not as comprehensive wrt functions touched: https://lkml.org/lkml/2015/3/2/10 But on the other hand I also tried to clean up some of the NR_CPUS usage while I was at it and this raises this question, from me, in the code like:

[PATCH 05/16] staging/lustre: fix up obsolete cpu function usage.

2015-03-02 Thread Rusty Russell
They triggered this cleanup, so I've separated their patch in the assumption they've already combed their code. Signed-off-by: Rusty Russell Cc: Oleg Drokin --- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c| 4 +- .../staging/lustre/lustre/libcfs/linux/linux-cpu.c | 88 +++---