Whamcloud - gitweb
LU-6285: o2iblnd: Do not use cpus_weight, it's deprecated 54/13954/2
authorOleg Drokin <oleg.drokin@intel.com>
Tue, 3 Mar 2015 19:44:10 +0000 (14:44 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 6 Apr 2015 01:18:11 +0000 (01:18 +0000)
Replace cpus_weight and for_each_cpu mask with
cpumaskweight and for_each_cpu respectively as per latest kernel guidelines.

Change-Id: I038eb38234c0a209a68ca24c8a860d0e84522c27
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/13954
Tested-by: Jenkins
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
lnet/klnds/o2iblnd/o2iblnd.c

index 8849b99..1180ac2 100644 (file)
@@ -693,8 +693,8 @@ kiblnd_get_completion_vector(kib_conn_t *conn, int cpt)
        mask = cfs_cpt_cpumask(lnet_cpt_table(), cpt);
 
        /* hash NID to CPU id in this partition... */
        mask = cfs_cpt_cpumask(lnet_cpt_table(), cpt);
 
        /* hash NID to CPU id in this partition... */
-       off = conn->ibc_peer->ibp_nid % cpus_weight(*mask);
-       for_each_cpu_mask(i, *mask) {
+       off = conn->ibc_peer->ibp_nid % cpumask_weight(mask);
+       for_each_cpu(i, mask) {
                if (off-- == 0)
                        return i % vectors;
        }
                if (off-- == 0)
                        return i % vectors;
        }