aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/hns/hns_roce_main.c
diff options
context:
space:
mode:
authorWeihang Li <liweihang@huawei.com>2020-01-11 18:32:39 +0800
committerJason Gunthorpe <jgg@mellanox.com>2020-01-15 14:11:34 -0400
commita91e093cad37c60dc16ca382ed6f869c4c99fb77 (patch)
treebfbb2bf90a80742def15866ca1cb1b6b157d6f61 /drivers/infiniband/hw/hns/hns_roce_main.c
parentRDMA/core: Use READ_ONCE for ib_ufile.async_file (diff)
downloadlinux-dev-a91e093cad37c60dc16ca382ed6f869c4c99fb77.tar.xz
linux-dev-a91e093cad37c60dc16ca382ed6f869c4c99fb77.zip
RDMA/hns: Remove some redundant variables related to capabilities
In struct hns_roce_caps, max_srq_sg and max_srqwqes is unused, and max_srqs has the same effect with num_srqs. So remove them from this structrue. Link: https://lore.kernel.org/r/1578738761-3176-2-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li <liweihang@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/hns/hns_roce_main.c')
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c
index 6e589f2ca35e..d0031d559213 100644
--- a/drivers/infiniband/hw/hns/hns_roce_main.c
+++ b/drivers/infiniband/hw/hns/hns_roce_main.c
@@ -210,7 +210,7 @@ static int hns_roce_query_device(struct ib_device *ib_dev,
props->max_pkeys = 1;
props->local_ca_ack_delay = hr_dev->caps.local_ca_ack_delay;
if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_SRQ) {
- props->max_srq = hr_dev->caps.max_srqs;
+ props->max_srq = hr_dev->caps.num_srqs;
props->max_srq_wr = hr_dev->caps.max_srq_wrs;
props->max_srq_sge = hr_dev->caps.max_srq_sges;
}