summaryrefslogtreecommitdiffstats
path: root/net/rds/ib_send.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman2019-01-28 08:44:58 +0100
committerGreg Kroah-Hartman2019-01-28 08:44:58 +0100
commitc9381e185fdcf86e9d7966d638c933894f87cdd7 (patch)
treed99259aded85a3fb95e9d52c56d9d3a0cfdfe460 /net/rds/ib_send.c
parentusb: ftdi-elan: Fix if == else warnings in ftdi_elan_respond_engine (diff)
parentLinux 5.0-rc4 (diff)
downloadkernel-qcow2-linux-c9381e185fdcf86e9d7966d638c933894f87cdd7.tar.gz
kernel-qcow2-linux-c9381e185fdcf86e9d7966d638c933894f87cdd7.tar.xz
kernel-qcow2-linux-c9381e185fdcf86e9d7966d638c933894f87cdd7.zip
Merge 5.0-rc4 into usb-next
We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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,
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) {