Commit a4be892e authored by Lijun Ou's avatar Lijun Ou Committed by Doug Ledford

IB/hns: Remove unused parameters in some functions

The parameter named collapsed unused in hns_roce_cq_alloc.
Also, parameter named doorbell_lock unsed in
hns_roce_v1_cq_set_ci. This patch optimize these parameters.
Signed-off-by: default avatarLijun Ou <oulijun@huawei.com>
Reviewed-by: default avatarWei Hu <xavier.huwei@huawei.com>
Signed-off-by: default avatarSalil Mehta <salil.mehta@huawei.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 1cfbfdd8
...@@ -83,8 +83,7 @@ static int hns_roce_sw2hw_cq(struct hns_roce_dev *dev, ...@@ -83,8 +83,7 @@ static int hns_roce_sw2hw_cq(struct hns_roce_dev *dev,
static int hns_roce_cq_alloc(struct hns_roce_dev *hr_dev, int nent, static int hns_roce_cq_alloc(struct hns_roce_dev *hr_dev, int nent,
struct hns_roce_mtt *hr_mtt, struct hns_roce_mtt *hr_mtt,
struct hns_roce_uar *hr_uar, struct hns_roce_uar *hr_uar,
struct hns_roce_cq *hr_cq, int vector, struct hns_roce_cq *hr_cq, int vector)
int collapsed)
{ {
struct hns_roce_cmd_mailbox *mailbox = NULL; struct hns_roce_cmd_mailbox *mailbox = NULL;
struct hns_roce_cq_table *cq_table = NULL; struct hns_roce_cq_table *cq_table = NULL;
...@@ -338,8 +337,8 @@ struct ib_cq *hns_roce_ib_create_cq(struct ib_device *ib_dev, ...@@ -338,8 +337,8 @@ struct ib_cq *hns_roce_ib_create_cq(struct ib_device *ib_dev,
} }
/* Allocate cq index, fill cq_context */ /* Allocate cq index, fill cq_context */
ret = hns_roce_cq_alloc(hr_dev, cq_entries, &hr_cq->hr_buf.hr_mtt, ret = hns_roce_cq_alloc(hr_dev, cq_entries, &hr_cq->hr_buf.hr_mtt, uar,
uar, hr_cq, vector, 0); hr_cq, vector);
if (ret) { if (ret) {
dev_err(dev, "Creat CQ .Failed to cq_alloc.\n"); dev_err(dev, "Creat CQ .Failed to cq_alloc.\n");
goto err_mtt; goto err_mtt;
......
...@@ -536,7 +536,6 @@ struct hns_roce_dev { ...@@ -536,7 +536,6 @@ struct hns_roce_dev {
struct hns_roce_uar priv_uar; struct hns_roce_uar priv_uar;
const char *irq_names[HNS_ROCE_MAX_IRQ_NUM]; const char *irq_names[HNS_ROCE_MAX_IRQ_NUM];
spinlock_t sm_lock; spinlock_t sm_lock;
spinlock_t cq_db_lock;
spinlock_t bt_cmd_lock; spinlock_t bt_cmd_lock;
struct hns_roce_ib_iboe iboe; struct hns_roce_ib_iboe iboe;
......
...@@ -1189,9 +1189,7 @@ static struct hns_roce_cqe *next_cqe_sw(struct hns_roce_cq *hr_cq) ...@@ -1189,9 +1189,7 @@ static struct hns_roce_cqe *next_cqe_sw(struct hns_roce_cq *hr_cq)
return get_sw_cqe(hr_cq, hr_cq->cons_index); return get_sw_cqe(hr_cq, hr_cq->cons_index);
} }
void hns_roce_v1_cq_set_ci(struct hns_roce_cq *hr_cq, u32 cons_index, void hns_roce_v1_cq_set_ci(struct hns_roce_cq *hr_cq, u32 cons_index)
spinlock_t *doorbell_lock)
{ {
u32 doorbell[2]; u32 doorbell[2];
...@@ -1251,8 +1249,7 @@ static void __hns_roce_v1_cq_clean(struct hns_roce_cq *hr_cq, u32 qpn, ...@@ -1251,8 +1249,7 @@ static void __hns_roce_v1_cq_clean(struct hns_roce_cq *hr_cq, u32 qpn,
*/ */
wmb(); wmb();
hns_roce_v1_cq_set_ci(hr_cq, hr_cq->cons_index, hns_roce_v1_cq_set_ci(hr_cq, hr_cq->cons_index);
&to_hr_dev(hr_cq->ib_cq.device)->cq_db_lock);
} }
} }
...@@ -1588,10 +1585,8 @@ int hns_roce_v1_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *wc) ...@@ -1588,10 +1585,8 @@ int hns_roce_v1_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *wc)
break; break;
} }
if (npolled) { if (npolled)
hns_roce_v1_cq_set_ci(hr_cq, hr_cq->cons_index, hns_roce_v1_cq_set_ci(hr_cq, hr_cq->cons_index);
&to_hr_dev(ibcq->device)->cq_db_lock);
}
spin_unlock_irqrestore(&hr_cq->lock, flags); spin_unlock_irqrestore(&hr_cq->lock, flags);
......
...@@ -951,7 +951,6 @@ static int hns_roce_setup_hca(struct hns_roce_dev *hr_dev) ...@@ -951,7 +951,6 @@ static int hns_roce_setup_hca(struct hns_roce_dev *hr_dev)
struct device *dev = &hr_dev->pdev->dev; struct device *dev = &hr_dev->pdev->dev;
spin_lock_init(&hr_dev->sm_lock); spin_lock_init(&hr_dev->sm_lock);
spin_lock_init(&hr_dev->cq_db_lock);
spin_lock_init(&hr_dev->bt_cmd_lock); spin_lock_init(&hr_dev->bt_cmd_lock);
ret = hns_roce_init_uar_table(hr_dev); ret = hns_roce_init_uar_table(hr_dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment