lkml.org 
[lkml]   [2018]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v2 02/16] remoteproc: add release ops in rproc_mem_entry struct
Date


> -----Original Message-----
> From: Bjorn Andersson [mailto:bjorn.andersson@linaro.org]
> Sent: Thursday, December 14, 2017 1:34 AM
> To: Loic PALLARDY <loic.pallardy@st.com>
> Cc: ohad@wizery.com; linux-remoteproc@vger.kernel.org; linux-
> kernel@vger.kernel.org; Arnaud POULIQUEN <arnaud.pouliquen@st.com>;
> benjamin.gaignard@linaro.org
> Subject: Re: [PATCH v2 02/16] remoteproc: add release ops in
> rproc_mem_entry struct
>
> On Thu 30 Nov 08:46 PST 2017, Loic Pallardy wrote:
>
> > +static int rproc_release_carveout(struct rproc *rproc, struct
> rproc_mem_entry *mem)
> > +{
> > + struct device *dev = &rproc->dev;
> > +
> > + /* clean up carveout allocations */
> > + dma_free_coherent(dev->parent, mem->len, mem->va, mem-
> >dma);
> > + list_del(&mem->node);
>
> The core is responsible for putting the node on a list, so let the
> cleanup take if off the list.
ok
>
> > + kfree(mem);
> > + return 0;
> > +}
> > +
> [..]
> > @@ -319,12 +322,11 @@ struct rproc_mem_entry {
> > dma_addr_t dma;
> > int len;
> > u32 da;
> > + int (*release)(struct rproc *rproc, struct rproc_mem_entry *mem);
>
> The placement here seems random, please move it last in the struct.
ok
>
> > void *priv;
> > struct list_head node;
> > };
> >
>
> Regards,
> Bjorn

\
 
 \ /
  Last update: 2018-01-14 23:25    [W:0.555 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site