Re: [PATCH v2 for-next 04/10] RDMA/hns: Optimize hns_roce_alloc_vf_resource()

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

 



On Fri, Mar 27, 2020 at 07:09:02AM +0000, liweihang wrote:
> On 2020/3/27 3:51, Jason Gunthorpe wrote:
> > On Fri, Mar 20, 2020 at 11:23:36AM +0800, Weihang Li wrote:
> > 
> >> @@ -2028,6 +2002,13 @@ static int hns_roce_v2_profile(struct hns_roce_dev *hr_dev)
> >>  	if (ret)
> >>  		set_default_caps(hr_dev);
> >>  
> >> +	ret = hns_roce_alloc_vf_resource(hr_dev);
> >> +	if (ret) {
> >> +		dev_err(hr_dev->dev, "Allocate vf resource fail, ret = %d.\n",
> >> +			ret);
> >> +		return ret;
> >> +	}
> > 
> > It is unfortunate these have to remain as dev_err()
> > 
> > I've thought about setting the name during ib_alloc_dev, which would
> > avoid this, what do you think?
> > 
> > Jason
> > 
> 
> Hi Jason,
> 
> Thanks for your comments. I agree with you and make a simple test by just
> moving assign_name() into _ib_alloc_device(), and ibdev_*() works fine
> anywhere in hns. But I'm not sure if there are any side effects.

Hmm. It actually looks like it should work now, older versions may
have had problems, but this looks OK.

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