Commit 03ccba5c authored by Yixian Liu's avatar Yixian Liu Committed by Jason Gunthorpe

RDMA/hns: Delete unnecessary uar from hns_roce_cq

The uar information is already recorded in priv_uar of hns_roce_dev, there
is no need to record it in hns_roce_cq again.

Link: https://lore.kernel.org/r/1572952082-6681-4-git-send-email-liweihang@hisilicon.comSigned-off-by: default avatarYixian Liu <liuyixian@huawei.com>
Signed-off-by: default avatarWeihang Li <liweihang@hisilicon.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 16a11e0b
...@@ -347,7 +347,6 @@ static int create_kernel_cq(struct hns_roce_dev *hr_dev, ...@@ -347,7 +347,6 @@ static int create_kernel_cq(struct hns_roce_dev *hr_dev,
struct hns_roce_cq *hr_cq, int cq_entries) struct hns_roce_cq *hr_cq, int cq_entries)
{ {
struct device *dev = hr_dev->dev; struct device *dev = hr_dev->dev;
struct hns_roce_uar *uar;
int ret; int ret;
if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_RECORD_DB) { if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_RECORD_DB) {
...@@ -367,9 +366,8 @@ static int create_kernel_cq(struct hns_roce_dev *hr_dev, ...@@ -367,9 +366,8 @@ static int create_kernel_cq(struct hns_roce_dev *hr_dev,
goto err_db; goto err_db;
} }
uar = &hr_dev->priv_uar;
hr_cq->cq_db_l = hr_dev->reg_base + hr_dev->odb_offset + hr_cq->cq_db_l = hr_dev->reg_base + hr_dev->odb_offset +
DB_REG_OFFSET * uar->index; DB_REG_OFFSET * hr_dev->priv_uar.index;
return 0; return 0;
......
...@@ -494,7 +494,6 @@ struct hns_roce_cq { ...@@ -494,7 +494,6 @@ struct hns_roce_cq {
void (*comp)(struct hns_roce_cq *cq); void (*comp)(struct hns_roce_cq *cq);
void (*event)(struct hns_roce_cq *cq, enum hns_roce_event event_type); void (*event)(struct hns_roce_cq *cq, enum hns_roce_event event_type);
struct hns_roce_uar *uar;
u32 cq_depth; u32 cq_depth;
u32 cons_index; u32 cons_index;
u32 *set_ci_db; u32 *set_ci_db;
......
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