[ofa-general] [PATCH] IB/ib_mthca: Remove an always true condition
Eli Cohen
eli at mellanox.co.il
Thu Jan 24 06:33:40 PST 2008
Remove an always true condition
srq->first_free can never be negative.
Signed-off-by: Eli Cohen <eli at mellanox.co.il>
---
drivers/infiniband/hw/mthca/mthca_srq.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/drivers/infiniband/hw/mthca/mthca_srq.c b/drivers/infiniband/hw/mthca/mthca_srq.c
index 553d681..782b478 100644
--- a/drivers/infiniband/hw/mthca/mthca_srq.c
+++ b/drivers/infiniband/hw/mthca/mthca_srq.c
@@ -475,11 +475,7 @@ void mthca_free_srq_wqe(struct mthca_srq *srq, u32 wqe_addr)
spin_lock(&srq->lock);
- if (likely(srq->first_free >= 0))
- *wqe_to_link(get_wqe(srq, srq->last_free)) = ind;
- else
- srq->first_free = ind;
-
+ *wqe_to_link(get_wqe(srq, srq->last_free)) = ind;
*wqe_to_link(get_wqe(srq, ind)) = -1;
srq->last_free = ind;
--
1.5.3.8
More information about the general
mailing list