From: Jason Gunthorpe <jgg@mellanox.com>
To: Adit Ranadive <aditr@vmware.com>
Cc: "dledford@redhat.com" <dledford@redhat.com>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
Bryan Tan <bryantan@vmware.com>,
Pv-drivers <Pv-drivers@vmware.com>
Subject: Re: [PATCH v3 for-next] RDMA/vmw_pvrdma: Use resource ids from physical device if available
Date: Mon, 28 Oct 2019 19:08:41 +0000 [thread overview]
Message-ID: <20191028190835.GZ22766@mellanox.com> (raw)
In-Reply-To: <20191028181444.19448-1-aditr@vmware.com>
On Mon, Oct 28, 2019 at 06:14:52PM +0000, Adit Ranadive wrote:
>
> + if (!qp->is_kernel) {
> + if (udata->outlen >= sizeof(qp_resp)) {
> + qp_resp.qpn = qp->ibqp.qp_num;
> + qp_resp.qp_handle = qp->qp_handle;
> +
> + if (ib_copy_to_udata(udata, &qp_resp,
> + min(udata->outlen,
> + sizeof(qp_resp)))) {
> + dev_warn(&dev->pdev->dev,
> + "failed to copy back udata\n");
> + __pvrdma_destroy_qp(dev, qp);
> + return ERR_PTR(-EINVAL);
> + }
> + }
> + }
This is just supposed to be like this:
+ if (udata) {
+ qp_resp.qpn = qp->ibqp.qp_num;
+ qp_resp.qp_handle = qp->qp_handle;
+
+ if (ib_copy_to_udata(udata, &qp_resp,
+ min(udata->outlen, sizeof(qp_resp)))) {
+ dev_warn(&dev->pdev->dev,
+ "failed to copy back udata\n");
+ __pvrdma_destroy_qp(dev, qp);
+ return ERR_PTR(-EINVAL);
I fixed it
Applied to for-next
Thanks,
Jason
next prev parent reply other threads:[~2019-10-28 19:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-28 18:14 [PATCH v3 for-next] RDMA/vmw_pvrdma: Use resource ids from physical device if available Adit Ranadive
2019-10-28 19:08 ` Jason Gunthorpe [this message]
2019-10-28 19:37 ` Adit Ranadive
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=20191028190835.GZ22766@mellanox.com \
--to=jgg@mellanox.com \
--cc=Pv-drivers@vmware.com \
--cc=aditr@vmware.com \
--cc=bryantan@vmware.com \
--cc=dledford@redhat.com \
--cc=linux-rdma@vger.kernel.org \
/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