diff options
author | Weihang Li <liweihang@huawei.com> | 2020-05-08 17:45:57 +0800 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2020-05-19 20:54:58 -0300 |
commit | 252067e95035151372f21c0c8626bf6fed9c5f0b (patch) | |
tree | e899f314808b068266dfdd3d3b4ddf1045daa82e /drivers | |
parent | 7b611d2f6e8b99b699996c52b823454f4a74978f (diff) |
RDMA/hns: Remove redundant memcpy()
srq_context is a local variables and is only used to get some fields from
buffer of mailbox. It's meaningless to copy mailbox's buffer's contents
back to it.
Link: https://lore.kernel.org/r/1588931159-56875-8-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')
-rw-r--r-- | drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c index 155c658ed3eb..34c183181908 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c @@ -5047,8 +5047,6 @@ static int hns_roce_v2_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr) attr->max_wr = srq->wqe_cnt - 1; attr->max_sge = srq->max_gs; - memcpy(srq_context, mailbox->buf, sizeof(*srq_context)); - out: hns_roce_free_cmd_mailbox(hr_dev, mailbox); return ret; |