}
for (qp->rq.wqe_shift = 4;
- (uint32_t)(1 << qp->rq.wqe_shift) < qp->rq.max_gs * sizeof (struct mlx4_wqe_data_seg);
- qp->rq.wqe_shift++)
+ (1 << qp->rq.wqe_shift) < qp->rq.max_gs * (int) sizeof (struct mlx4_wqe_data_seg);
+ qp->rq.wqe_shift++)
; /* nothing */
qp->buf_size = (qp->rq.wqe_cnt << qp->rq.wqe_shift) +
int wqe_size;
struct mlx4_context *ctx = to_mctx(qp->ibv_qp.context);
- wqe_size = (uint32_t)(1 << qp->sq.wqe_shift) - sizeof (struct mlx4_wqe_ctrl_seg);
+ wqe_size = (1 << qp->sq.wqe_shift) - (int) sizeof (struct mlx4_wqe_ctrl_seg);
+
switch (type) {
case IBV_QPT_UD:
wqe_size -= sizeof (struct mlx4_wqe_datagram_seg);