Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=55a98e955caab78a5959933a4a3a0136e2491d6c
Commit:     55a98e955caab78a5959933a4a3a0136e2491d6c
Parent:     3ac8c70f74ca67111c570f4ba828cc4b6fc229f4
Author:     Eli Cohen <[EMAIL PROTECTED]>
AuthorDate: Wed Oct 10 17:55:37 2007 +0200
Committer:  Roland Dreier <[EMAIL PROTECTED]>
CommitDate: Wed Oct 10 11:24:33 2007 -0700

    IB/mthca: Mark error paths as unlikely() in post_srq_recv functions
    
    Signed-off-by: Eli Cohen <[EMAIL PROTECTED]>
    Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
---
 drivers/infiniband/hw/mthca/mthca_srq.c |    8 ++++----
 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 88d219e..3f58c11 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,
        for (nreq = 0; wr; wr = wr->next) {
                ind = srq->first_free;
 
-               if (ind < 0) {
+               if (unlikely(ind < 0)) {
                        mthca_err(dev, "SRQ %06x full\n", srq->srqn);
                        err = -ENOMEM;
                        *bad_wr = wr;
@@ -519,7 +519,7 @@ int mthca_tavor_post_srq_recv(struct ib_srq *ibsrq, struct 
ib_recv_wr *wr,
                wqe       = get_wqe(srq, ind);
                next_ind  = *wqe_to_link(wqe);
 
-               if (next_ind < 0) {
+               if (unlikely(next_ind < 0)) {
                        mthca_err(dev, "SRQ %06x full\n", srq->srqn);
                        err = -ENOMEM;
                        *bad_wr = wr;
@@ -623,7 +623,7 @@ int mthca_arbel_post_srq_recv(struct ib_srq *ibsrq, struct 
ib_recv_wr *wr,
        for (nreq = 0; wr; ++nreq, wr = wr->next) {
                ind = srq->first_free;
 
-               if (ind < 0) {
+               if (unlikely(ind < 0)) {
                        mthca_err(dev, "SRQ %06x full\n", srq->srqn);
                        err = -ENOMEM;
                        *bad_wr = wr;
@@ -633,7 +633,7 @@ int mthca_arbel_post_srq_recv(struct ib_srq *ibsrq, struct 
ib_recv_wr *wr,
                wqe       = get_wqe(srq, ind);
                next_ind  = *wqe_to_link(wqe);
 
-               if (next_ind < 0) {
+               if (unlikely(next_ind < 0)) {
                        mthca_err(dev, "SRQ %06x full\n", srq->srqn);
                        err = -ENOMEM;
                        *bad_wr = wr;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to