[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200806024322.GA7179@yilunxu-OptiPlex-7050>
Date: Thu, 6 Aug 2020 10:43:22 +0800
From: Xu Yilun <yilun.xu@...el.com>
To: "Wu, Hao" <hao.wu@...el.com>
Cc: "mdf@...nel.org" <mdf@...nel.org>,
"linux-fpga@...r.kernel.org" <linux-fpga@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"trix@...hat.com" <trix@...hat.com>,
"lgoncalv@...hat.com" <lgoncalv@...hat.com>,
Matthew Gerlach <matthew.gerlach@...ux.intel.com>,
"Weight, Russell H" <russell.h.weight@...el.com>
Subject: Re: [PATCH v3 2/4] fpga: dfl: map feature mmio resources in their
own feature drivers
On Wed, Aug 05, 2020 at 08:15:27PM +0800, Wu, Hao wrote:
> > Subject: [PATCH v3 2/4] fpga: dfl: map feature mmio resources in their own
> > feature drivers
> >
> > +static int dfl_binfo_prepare(struct build_feature_devs_info *binfo,
> > + resource_size_t start, resource_size_t len)
> > +{
> > +struct device *dev = binfo->dev;
> > +void __iomem *ioaddr;
> > +
> > +if (!devm_request_mem_region(dev, start, len, dev_name(dev))) {
> > +dev_err(dev, "request region fail, start:%pa, len:%pa\n",
> > +&start, &len);
> > +return -EBUSY;
> > +}
> > +
> > +ioaddr = devm_ioremap(dev, start, len);
> > +if (!ioaddr) {
> > +dev_err(dev, "ioremap region fail, start:%pa, len:%pa\n",
> > +&start, &len);
> > +devm_release_mem_region(dev, start, len);
>
> as it's devm_request_mem_region, do we still need to release it here?
Yes, I could delete it.
> > @@ -869,24 +935,24 @@ static int parse_feature_private(struct
> > build_feature_devs_info *binfo,
> > *
> > * @binfo: build feature devices information.
> > * @dfl: device feature list to parse
>
> Remove this line.
Yes.
Thanks,
Yilun.
>
> Other place looks good to me.
>
> Thanks
> Hao
Powered by blists - more mailing lists