[ofa-general] [PATCH] ib/limthca: Remove an always true condition

Eli Cohen eli at mellanox.co.il
Thu Jan 24 06:23:48 PST 2008


Remove an always true condition

srq->first_free can never be negative.

Signed-off-by: Eli Cohen <eli at mellanox.co.il>
---
 src/srq.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/src/srq.c b/src/srq.c
index f9fc006..72b7a0e 100644
--- a/src/srq.c
+++ b/src/srq.c
@@ -66,11 +66,7 @@ void mthca_free_srq_wqe(struct mthca_srq *srq, int ind)
 {
 	pthread_spin_lock(&srq->lock);
 
-	if (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