From b95db057d0501fb19f807cddf3a8ba3f7f47cb1a Mon Sep 17 00:00:00 2001 From: Oleg Drokin Date: Tue, 3 Mar 2015 14:44:10 -0500 Subject: [PATCH] LU-6285: o2iblnd: Do not use cpus_weight, it's deprecated 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 Reviewed-on: http://review.whamcloud.com/13954 Tested-by: Jenkins Reviewed-by: Liang Zhen Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Dmitry Eremin --- lnet/klnds/o2iblnd/o2iblnd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lnet/klnds/o2iblnd/o2iblnd.c b/lnet/klnds/o2iblnd/o2iblnd.c index 8849b99..1180ac2 100644 --- a/lnet/klnds/o2iblnd/o2iblnd.c +++ b/lnet/klnds/o2iblnd/o2iblnd.c @@ -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... */ - 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; } -- 1.8.3.1