From mboxrd@z Thu Jan 1 00:00:00 1970 From: Francesco Lavra Subject: Re: [Linaro-mm-sig] [PATCH] dma-buf: Add debugfs support Date: Sun, 16 Dec 2012 17:56:49 +0100 Message-ID: <50CDFD51.3030800@gmail.com> References: <1355477817-5750-1-git-send-email-sumit.semwal@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1355477817-5750-1-git-send-email-sumit.semwal@ti.com> Sender: linux-media-owner@vger.kernel.org To: sumit.semwal@ti.com Cc: sumit.semwal@linaro.org, linaro-mm-sig@lists.linaro.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org List-Id: dri-devel@lists.freedesktop.org Hi, On 12/14/2012 10:36 AM, sumit.semwal@ti.com wrote: > From: Sumit Semwal > > Add debugfs support to make it easier to print debug information > about the dma-buf buffers. > > Signed-off-by: Sumit Semwal > --- > drivers/base/dma-buf.c | 149 +++++++++++++++++++++++++++++++++++++++++++++++ > include/linux/dma-buf.h | 6 +- > 2 files changed, 154 insertions(+), 1 deletion(-) [...] > diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h > index bd2e52c..160453f 100644 > --- a/include/linux/dma-buf.h > +++ b/include/linux/dma-buf.h > @@ -112,6 +112,7 @@ struct dma_buf_ops { > * @file: file pointer used for sharing buffers across, and for refcounting. > * @attachments: list of dma_buf_attachment that denotes all devices attached. > * @ops: dma_buf_ops associated with this buffer object. > + * @list_node: node for dma_buf accounting and debugging. > * @priv: exporter specific private data for this buffer object. > */ > struct dma_buf { > @@ -121,6 +122,8 @@ struct dma_buf { > const struct dma_buf_ops *ops; > /* mutex to serialize list manipulation and attach/detach */ > struct mutex lock; > + > + struct list_head list_node; > void *priv; > }; > > @@ -183,5 +186,6 @@ int dma_buf_mmap(struct dma_buf *, struct vm_area_struct *, > unsigned long); > void *dma_buf_vmap(struct dma_buf *); > void dma_buf_vunmap(struct dma_buf *, void *vaddr); > - > +int dma_buf_debugfs_create_file(const char *name, > + int (*write)(struct seq_file *)); Why is this function declared in the public header file? -- Francesco