Re: [PATCH v3 for-next] RDMA/vmw_pvrdma: Use resource ids from physical device if available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/28/19 12:08 PM, Jason Gunthorpe wrote:
> 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
> 

Makes sense. Thanks!

> Thanks,
> Jason
> 





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux