From ff6864620b302e1293d09e199acbcd7e6596ee3a Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 10 Jul 2018 04:14:38 +0000 Subject: [PATCH] ib_srpt: Fix ch->max_sge calculation git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7410 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index a34cff61f..a29634d6b 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;