aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca/mthca_srq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_srq.c')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_srq.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_srq.c b/drivers/infiniband/hw/mthca/mthca_srq.c
index 88d219e730ad..3f58c11a62b7 100644
--- a/drivers/infiniband/hw/mthca/mthca_srq.c
+++ b/drivers/infiniband/hw/mthca/mthca_srq.c
@@ -509,7 +509,7 @@ int mthca_tavor_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr,
509 for (nreq = 0; wr; wr = wr->next) { 509 for (nreq = 0; wr; wr = wr->next) {
510 ind = srq->first_free; 510 ind = srq->first_free;
511 511
512 if (ind < 0) { 512 if (unlikely(ind < 0)) {
513 mthca_err(dev, "SRQ %06x full\n", srq->srqn); 513 mthca_err(dev, "SRQ %06x full\n", srq->srqn);
514 err = -ENOMEM; 514 err = -ENOMEM;
515 *bad_wr = wr; 515 *bad_wr = wr;
@@ -519,7 +519,7 @@ int mthca_tavor_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr,
519 wqe = get_wqe(srq, ind); 519 wqe = get_wqe(srq, ind);
520 next_ind = *wqe_to_link(wqe); 520 next_ind = *wqe_to_link(wqe);
521 521
522 if (next_ind < 0) { 522 if (unlikely(next_ind < 0)) {
523 mthca_err(dev, "SRQ %06x full\n", srq->srqn); 523 mthca_err(dev, "SRQ %06x full\n", srq->srqn);
524 err = -ENOMEM; 524 err = -ENOMEM;
525 *bad_wr = wr; 525 *bad_wr = wr;
@@ -623,7 +623,7 @@ int mthca_arbel_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr,
623 for (nreq = 0; wr; ++nreq, wr = wr->next) { 623 for (nreq = 0; wr; ++nreq, wr = wr->next) {
624 ind = srq->first_free; 624 ind = srq->first_free;
625 625
626 if (ind < 0) { 626 if (unlikely(ind < 0)) {
627 mthca_err(dev, "SRQ %06x full\n", srq->srqn); 627 mthca_err(dev, "SRQ %06x full\n", srq->srqn);
628 err = -ENOMEM; 628 err = -ENOMEM;
629 *bad_wr = wr; 629 *bad_wr = wr;
@@ -633,7 +633,7 @@ int mthca_arbel_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr,
633 wqe = get_wqe(srq, ind); 633 wqe = get_wqe(srq, ind);
634 next_ind = *wqe_to_link(wqe); 634 next_ind = *wqe_to_link(wqe);
635 635
636 if (next_ind < 0) { 636 if (unlikely(next_ind < 0)) {
637 mthca_err(dev, "SRQ %06x full\n", srq->srqn); 637 mthca_err(dev, "SRQ %06x full\n", srq->srqn);
638 err = -ENOMEM; 638 err = -ENOMEM;
639 *bad_wr = wr; 639 *bad_wr = wr;