From: "Michael S. Tsirkin" <mst@mellanox.co.il>
To: Arjan van de Ven <arjan@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>, Zach Brown <zach.brown@oracle.com>,
openib-general@openib.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org
Subject: [PATCH updated] IB/mthca: comment fix
Date: Mon, 10 Jul 2006 18:18:24 +0300 [thread overview]
Message-ID: <20060710151824.GL24705@mellanox.co.il> (raw)
In-Reply-To: <20060710111412.GD24705@mellanox.co.il>
OK, the following makes it clear what the function does, from its name.
More comments?
---
After recent changes, mthca_wq_init does not actually initialize the WQ as it
used to - it simply resets all index fields to their initial values. So,
let's rename it to mthca_wq_reset.
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c
index 490fc78..cd8b672 100644
--- a/drivers/infiniband/hw/mthca/mthca_qp.c
+++ b/drivers/infiniband/hw/mthca/mthca_qp.c
@@ -222,9 +222,8 @@ static void *get_send_wqe(struct mthca_q
(PAGE_SIZE - 1));
}
-static void mthca_wq_init(struct mthca_wq *wq)
+static void mthca_wq_reset(struct mthca_wq *wq)
{
- /* mthca_alloc_qp_common() initializes the locks */
wq->next_ind = 0;
wq->last_comp = wq->max - 1;
wq->head = 0;
@@ -845,10 +844,10 @@ int mthca_modify_qp(struct ib_qp *ibqp,
mthca_cq_clean(dev, to_mcq(qp->ibqp.recv_cq), qp->qpn,
qp->ibqp.srq ? to_msrq(qp->ibqp.srq) : NULL);
- mthca_wq_init(&qp->sq);
+ mthca_wq_reset(&qp->sq);
qp->sq.last = get_send_wqe(qp, qp->sq.max - 1);
- mthca_wq_init(&qp->rq);
+ mthca_wq_reset(&qp->rq);
qp->rq.last = get_recv_wqe(qp, qp->rq.max - 1);
if (mthca_is_memfree(dev)) {
@@ -1112,9 +1111,9 @@ static int mthca_alloc_qp_common(struct
qp->atomic_rd_en = 0;
qp->resp_depth = 0;
qp->sq_policy = send_policy;
- mthca_wq_init(&qp->sq);
- mthca_wq_init(&qp->rq);
- /* these are initialized separately so lockdep can tell them apart */
+ mthca_wq_reset(&qp->sq);
+ mthca_wq_reset(&qp->rq);
+
spin_lock_init(&qp->sq.lock);
spin_lock_init(&qp->rq.lock);
--
MST
next prev parent reply other threads:[~2006-07-10 15:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-10 11:14 [PATCH] IB/mthca: comment fix Michael S. Tsirkin
2006-07-10 11:18 ` Arjan van de Ven
2006-07-10 11:31 ` Michael S. Tsirkin
2006-07-10 11:45 ` Arjan van de Ven
2006-07-10 11:59 ` Michael S. Tsirkin
2006-07-10 15:18 ` Michael S. Tsirkin [this message]
2006-07-10 21:15 ` [PATCHv2] " Michael S. Tsirkin
2006-07-10 21:20 ` Zach Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060710151824.GL24705@mellanox.co.il \
--to=mst@mellanox.co.il \
--cc=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=netdev@vger.kernel.org \
--cc=openib-general@openib.org \
--cc=zach.brown@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).