提交 21bfd470 编写于 作者: D Dan Carpenter 提交者: Roland Dreier

RDMA/cxgb3: Timeout condition is never true

This is a static checker fix.  "count" is unsigned so it's never -1.
Since "count" is 16 bits and the addition operation is implicitly
casted to int then there is no wrapping here.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NSteve Wise <swise@opengridcomputing.com>
Signed-off-by: NRoland Dreier <roland@purestorage.com>
上级 fedaf4ff
...@@ -883,7 +883,8 @@ u16 iwch_rqes_posted(struct iwch_qp *qhp) ...@@ -883,7 +883,8 @@ u16 iwch_rqes_posted(struct iwch_qp *qhp)
{ {
union t3_wr *wqe = qhp->wq.queue; union t3_wr *wqe = qhp->wq.queue;
u16 count = 0; u16 count = 0;
while ((count+1) != 0 && fw_riwrh_opcode((struct fw_riwrh *)wqe) == T3_WR_RCV) {
while (count < USHRT_MAX && fw_riwrh_opcode((struct fw_riwrh *)wqe) == T3_WR_RCV) {
count++; count++;
wqe++; wqe++;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册