OSDN Git Service

staging/lustre/o2iblnd: Don't use cpus_weight
authorOleg Drokin <green@linuxhacker.ru>
Wed, 4 Mar 2015 06:07:53 +0000 (01:07 -0500)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 5 Mar 2015 04:57:06 +0000 (15:27 +1030)
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>
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c

index 6510169..a25816a 100644 (file)
@@ -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;
        }