diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 719c855df..88c7b53a8 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -2244,7 +2244,7 @@ retry: */ ch->max_sge = sdev->dev_attr.max_sge - min(max_sge_delta, - max_t(unsigned int, 0, + max_t(int, 0, sdev->dev_attr.max_sge - max_sge_delta)); qp_init->cap.max_send_sge = ch->max_sge; qp_init->cap.max_recv_sge = ch->max_sge;