diff options
author | Jacob Wen <jian.w.wen@oracle.com> | 2019-01-07 09:59:59 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-01-07 07:22:36 -0800 |
commit | eeb2c4fb6a3d0ebed35fbc13a255f691c8b8d7e5 (patch) | |
tree | a6a3fd94a38cd29cddb7b6ce6cf3f90fbf45f3ba /net/rds/ib_send.c | |
parent | 10262b0b53666cbc506989b17a3ead1e9c3b43b4 (diff) | |
download | linux-eeb2c4fb6a3d0ebed35fbc13a255f691c8b8d7e5.tar.bz2 |
rds: use DIV_ROUND_UP instead of ceil
Yes indeed, DIV_ROUND_UP is in kernel.h.
Signed-off-by: Jacob Wen <jian.w.wen@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds/ib_send.c')
-rw-r--r-- | net/rds/ib_send.c | 4 |
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, if (be32_to_cpu(rm->m_inc.i_hdr.h_len) == 0) i = 1; else - i = ceil(be32_to_cpu(rm->m_inc.i_hdr.h_len), RDS_FRAG_SIZE); + i = DIV_ROUND_UP(be32_to_cpu(rm->m_inc.i_hdr.h_len), RDS_FRAG_SIZE); work_alloc = rds_ib_ring_alloc(&ic->i_send_ring, i, &pos); if (work_alloc == 0) { @@ -879,7 +879,7 @@ int rds_ib_xmit_rdma(struct rds_connection *conn, struct rm_rdma_op *op) * Instead of knowing how to return a partial rdma read/write we insist that there * be enough work requests to send the entire message. */ - i = ceil(op->op_count, max_sge); + i = DIV_ROUND_UP(op->op_count, max_sge); work_alloc = rds_ib_ring_alloc(&ic->i_send_ring, i, &pos); if (work_alloc != i) { |