aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds/ib_send.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/rds/ib_send.c')
-rw-r--r--net/rds/ib_send.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/rds/ib_send.c b/net/rds/ib_send.c
index 2dcb555e6350..4e0c36acf866 100644
--- a/net/rds/ib_send.c
+++ b/net/rds/ib_send.c
@@ -522,7 +522,7 @@ int rds_ib_xmit(struct rds_connection *conn, struct rds_message *rm,
522 if (be32_to_cpu(rm->m_inc.i_hdr.h_len) == 0) 522 if (be32_to_cpu(rm->m_inc.i_hdr.h_len) == 0)
523 i = 1; 523 i = 1;
524 else 524 else
525 i = ceil(be32_to_cpu(rm->m_inc.i_hdr.h_len), RDS_FRAG_SIZE); 525 i = DIV_ROUND_UP(be32_to_cpu(rm->m_inc.i_hdr.h_len), RDS_FRAG_SIZE);
526 526
527 work_alloc = rds_ib_ring_alloc(&ic->i_send_ring, i, &pos); 527 work_alloc = rds_ib_ring_alloc(&ic->i_send_ring, i, &pos);
528 if (work_alloc == 0) { 528 if (work_alloc == 0) {
@@ -879,7 +879,7 @@ int rds_ib_xmit_rdma(struct rds_connection *conn, struct rm_rdma_op *op)
879 * Instead of knowing how to return a partial rdma read/write we insist that there 879 * Instead of knowing how to return a partial rdma read/write we insist that there
880 * be enough work requests to send the entire message. 880 * be enough work requests to send the entire message.
881 */ 881 */
882 i = ceil(op->op_count, max_sge); 882 i = DIV_ROUND_UP(op->op_count, max_sge);
883 883
884 work_alloc = rds_ib_ring_alloc(&ic->i_send_ring, i, &pos); 884 work_alloc = rds_ib_ring_alloc(&ic->i_send_ring, i, &pos);
885 if (work_alloc != i) { 885 if (work_alloc != i) {