linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Weihang Li <liweihang@huawei.com>
To: <dledford@redhat.com>, <jgg@ziepe.ca>
Cc: <leon@kernel.org>, <linux-rdma@vger.kernel.org>, <linuxarm@huawei.com>
Subject: [PATCH for-next 7/9] RDMA/hns: Remove redundant memcpy()
Date: Fri, 8 May 2020 17:45:57 +0800	[thread overview]
Message-ID: <1588931159-56875-8-git-send-email-liweihang@huawei.com> (raw)
In-Reply-To: <1588931159-56875-1-git-send-email-liweihang@huawei.com>

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.

Signed-off-by: Weihang Li <liweihang@huawei.com>
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 --
 1 file changed, 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 61c6bb3..d137abc 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -5044,8 +5044,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;
-- 
2.8.1


  parent reply	other threads:[~2020-05-08  9:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-08  9:45 [PATCH for-next 0/9] RDMA/hns: Various fixes and cleanups Weihang Li
2020-05-08  9:45 ` [PATCH for-next 1/9] RDMA/hns: Bugfix for querying qkey Weihang Li
2020-05-08  9:45 ` [PATCH for-next 2/9] RDMA/hns: Fix cmdq parameter of querying pf timer resource Weihang Li
2020-05-08  9:45 ` [PATCH for-next 3/9] RDMA/hns: Fix assignment to ba_pg_sz of eqe Weihang Li
2020-05-08  9:45 ` [PATCH for-next 4/9] RDMA/hns: Fix wrong assignment of SRQ's max_wr Weihang Li
2020-05-08  9:45 ` [PATCH for-next 5/9] RDMA/hns: Fix error with to_hr_hem_entries_count() Weihang Li
2020-05-08  9:45 ` [PATCH for-next 6/9] RDMA/hns: Store mr len information into mr obj Weihang Li
2020-05-08  9:45 ` Weihang Li [this message]
2020-05-08  9:45 ` [PATCH for-next 8/9] RDMA/hns: Rename macro for defining hns hardware page size Weihang Li
2020-05-08  9:45 ` [PATCH for-next 9/9] RDMA/hns: Reserve one sge in order to avoid local length error Weihang Li
2020-05-22  7:39 ` [PATCH for-next 0/9] RDMA/hns: Various fixes and cleanups liweihang
2020-05-22  9:01   ` liweihang
2020-05-22 14:28   ` Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1588931159-56875-8-git-send-email-liweihang@huawei.com \
    --to=liweihang@huawei.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).