projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b611d2
)
RDMA/hns: Remove redundant memcpy()
author
Weihang Li
<liweihang@huawei.com>
Fri, 8 May 2020 09:45:57 +0000
(17:45 +0800)
committer
Jason Gunthorpe
<jgg@mellanox.com>
Tue, 19 May 2020 23:54:58 +0000
(20:54 -0300)
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>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index
155c658
..
34c1831
100644
(file)
--- 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;