summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca/mthca_cq.c
diff options
context:
space:
mode:
authorRoland Dreier2005-06-27 23:36:43 +0200
committerLinus Torvalds2005-06-28 00:11:45 +0200
commita03a5a67b243e9a24805ee18272ad25e5b2ca92c (patch)
tree5e4a1d3ec8482a482caa6697cba12a819ef6aa8a /drivers/infiniband/hw/mthca/mthca_cq.c
parent[PATCH] IB/mthca: Fix memset size (diff)
downloadkernel-qcow2-linux-a03a5a67b243e9a24805ee18272ad25e5b2ca92c.tar.gz
kernel-qcow2-linux-a03a5a67b243e9a24805ee18272ad25e5b2ca92c.tar.xz
kernel-qcow2-linux-a03a5a67b243e9a24805ee18272ad25e5b2ca92c.zip
[PATCH] IB/mthca: Move mthca_is_memfree checks
Make mthca_table_put() and mthca_table_put_range() NOPs if the device is not mem-free, so that we don't have to have "if (mthca_is_memfree())" tests in the callers of these functions. This makes our code more readable and maintainable, and saves a couple dozen bytes of text in ib_mthca.ko as well. Signed-off-by: Roland Dreier <roland@topspin.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_cq.c')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_cq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_cq.c b/drivers/infiniband/hw/mthca/mthca_cq.c
index 5dae5b5dc8e7..505d059216e9 100644
--- a/drivers/infiniband/hw/mthca/mthca_cq.c
+++ b/drivers/infiniband/hw/mthca/mthca_cq.c
@@ -918,9 +918,9 @@ void mthca_free_cq(struct mthca_dev *dev,
if (mthca_is_memfree(dev)) {
mthca_free_db(dev, MTHCA_DB_TYPE_CQ_ARM, cq->arm_db_index);
mthca_free_db(dev, MTHCA_DB_TYPE_CQ_SET_CI, cq->set_ci_db_index);
- mthca_table_put(dev, dev->cq_table.table, cq->cqn);
}
+ mthca_table_put(dev, dev->cq_table.table, cq->cqn);
mthca_free(&dev->cq_table.alloc, cq->cqn);
kfree(mailbox);
}