Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
[sfrench/cifs-2.6.git] / drivers / infiniband / hw / cxgb3 / iwch_qp.c
index ae47bfd22bd525eb4d4ff2b317790a3b408cc635..c64d27bf2c15b20eba43ddf91051ece1212495fb 100644 (file)
@@ -371,7 +371,7 @@ int iwch_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
        }
        num_wrs = Q_FREECNT(qhp->wq.sq_rptr, qhp->wq.sq_wptr,
                  qhp->wq.sq_size_log2);
-       if (num_wrs <= 0) {
+       if (num_wrs == 0) {
                spin_unlock_irqrestore(&qhp->lock, flag);
                err = -ENOMEM;
                goto out;
@@ -554,7 +554,7 @@ int iwch_bind_mw(struct ib_qp *qp,
        }
        num_wrs = Q_FREECNT(qhp->wq.sq_rptr, qhp->wq.sq_wptr,
                            qhp->wq.sq_size_log2);
-       if ((num_wrs) <= 0) {
+       if (num_wrs == 0) {
                spin_unlock_irqrestore(&qhp->lock, flag);
                return -ENOMEM;
        }
@@ -816,7 +816,7 @@ static void __flush_qp(struct iwch_qp *qhp, unsigned long *flag)
        atomic_inc(&qhp->refcnt);
        spin_unlock_irqrestore(&qhp->lock, *flag);
 
-       /* locking heirarchy: cq lock first, then qp lock. */
+       /* locking hierarchy: cq lock first, then qp lock. */
        spin_lock_irqsave(&rchp->lock, *flag);
        spin_lock(&qhp->lock);
        cxio_flush_hw_cq(&rchp->cq);
@@ -827,7 +827,7 @@ static void __flush_qp(struct iwch_qp *qhp, unsigned long *flag)
        if (flushed)
                (*rchp->ibcq.comp_handler)(&rchp->ibcq, rchp->ibcq.cq_context);
 
-       /* locking heirarchy: cq lock first, then qp lock. */
+       /* locking hierarchy: cq lock first, then qp lock. */
        spin_lock_irqsave(&schp->lock, *flag);
        spin_lock(&qhp->lock);
        cxio_flush_hw_cq(&schp->cq);