Skip to content

Commit

Permalink
staging/lustre/o2iblnd: Don't use cpus_weight
Browse files Browse the repository at this point in the history
cpus_weight and for_each_cpu_mask are deprecated, so replace them
with cpumask_weight and for_each_cpu respectively.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
Oleg Drokin authored and Rusty Russell committed Mar 5, 2015
1 parent b25e74b commit e97636b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
Original file line number Diff line number Diff line change
Expand Up @@ -638,8 +638,8 @@ kiblnd_get_completion_vector(kib_conn_t *conn, int cpt)
return 0;

/* hash NID to CPU id in this partition... */
off = do_div(nid, cpus_weight(*mask));
for_each_cpu_mask(i, *mask) {
off = do_div(nid, cpumask_weight(mask));
for_each_cpu(i, mask) {
if (off-- == 0)
return i % vectors;
}
Expand Down

0 comments on commit e97636b

Please sign in to comment.