diff options
Diffstat (limited to 'drivers/infiniband/hw/mlx4/qp.c')
-rw-r--r-- | drivers/infiniband/hw/mlx4/qp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index 5c6d05427a0f..4c15fa3426b8 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c | |||
@@ -207,8 +207,8 @@ static int set_rq_size(struct mlx4_ib_dev *dev, struct ib_qp_cap *cap, | |||
207 | if (is_user && (!cap->max_recv_wr || !cap->max_recv_sge)) | 207 | if (is_user && (!cap->max_recv_wr || !cap->max_recv_sge)) |
208 | return -EINVAL; | 208 | return -EINVAL; |
209 | 209 | ||
210 | qp->rq.max = roundup_pow_of_two(max(1, cap->max_recv_wr)); | 210 | qp->rq.max = roundup_pow_of_two(max(1U, cap->max_recv_wr)); |
211 | qp->rq.max_gs = roundup_pow_of_two(max(1, cap->max_recv_sge)); | 211 | qp->rq.max_gs = roundup_pow_of_two(max(1U, cap->max_recv_sge)); |
212 | qp->rq.wqe_shift = ilog2(qp->rq.max_gs * sizeof (struct mlx4_wqe_data_seg)); | 212 | qp->rq.wqe_shift = ilog2(qp->rq.max_gs * sizeof (struct mlx4_wqe_data_seg)); |
213 | } | 213 | } |
214 | 214 | ||