RE: [PATCH] staging: android: ion: refactory ion_alloc for kernel driver use

From: Zengtao (B)
Date: Fri Mar 29 2019 - 22:33:24 EST


>-----Original Message-----
>From: Dan Carpenter [mailto:dan.carpenter@xxxxxxxxxx]
>Sent: Friday, March 29, 2019 7:03 PM
>To: Zengtao (B) <prime.zeng@xxxxxxxxxxxxx>
>Cc: labbott@xxxxxxxxxx; sumit.semwal@xxxxxxxxxx;
>devel@xxxxxxxxxxxxxxxxxxxx; Todd Kjos <tkjos@xxxxxxxxxxx>; Greg
>Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>;
>linux-kernel@xxxxxxxxxxxxxxx; dri-devel@xxxxxxxxxxxxxxxxxxxxx;
>linaro-mm-sig@xxxxxxxxxxxxxxxx; Arve HjÃnnevÃg <arve@xxxxxxxxxxx>;
>Joel Fernandes <joel@xxxxxxxxxxxxxxxxx>; Martijn Coenen
><maco@xxxxxxxxxxx>; Christian Brauner <christian@xxxxxxxxxx>
>Subject: Re: [PATCH] staging: android: ion: refactory ion_alloc for kernel
>driver use
>
>If we're going to export ion_alloc() for other drivers to use then let's make
>an ion_free() helper function as well.
>

Good catch, thanks.

Regards
Zengtao

>void ion_free(struct dma_buf *dmabuf)
>{
> dma_buf_put(dmabuf);
>}
>
>regards,
>dan carpenter