From: Peng Tao Date: Fri, 7 Jun 2013 14:07:21 +0000 (+0800) Subject: staging/lustre/lnet: fix build error on i386 X-Git-Tag: firefly_0821_release~176^2~5845^2~183 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5f43264c5320624f3b458c5794f37220c4fc2934;p=firefly-linux-kernel-4.4.55.git staging/lustre/lnet: fix build error on i386 make ARCH=i386 allyesconfig gave bellow errors: drivers/built-in.o: In function `kiblnd_create_conn': >> (.text+0x1a74425): undefined reference to `__umoddi3' Reported-by: Wu Fengguang Signed-off-by: Peng Tao Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c index 221d37311cae..29a97943e4c7 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c @@ -39,6 +39,7 @@ */ #include "o2iblnd.h" +#include lnd_t the_o2iblnd = { .lnd_type = O2IBLND, @@ -694,6 +695,7 @@ kiblnd_get_completion_vector(kib_conn_t *conn, int cpt) int vectors; int off; int i; + lnet_nid_t nid = conn->ibc_peer->ibp_nid; vectors = conn->ibc_cmid->device->num_comp_vectors; if (vectors <= 1) @@ -702,7 +704,7 @@ 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); + off = do_div(nid, cpus_weight(*mask)); for_each_cpu_mask(i, *mask) { if (off-- == 0) return i % vectors;