Thread (21 messages) 21 messages, 4 authors, 2021-09-06

Re: [PATCH 4/8] staging: media: zoran: add debugfs

From: LABBE Corentin <clabbe@baylibre.com>
Date: 2021-09-06 13:36:54
Also in: linux-media, lkml

Le Sat, Sep 04, 2021 at 07:53:00AM +0200, Greg KH a écrit :
On Fri, Sep 03, 2021 at 07:15:36PM +0000, Corentin Labbe wrote:
quoted
Add debugfs for displaying zoran debug and stats information.

Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
---
 drivers/staging/media/zoran/Kconfig      | 10 ++++++
 drivers/staging/media/zoran/zoran.h      |  5 +++
 drivers/staging/media/zoran/zoran_card.c | 39 ++++++++++++++++++++++++
 3 files changed, 54 insertions(+)

+#ifdef CONFIG_VIDEO_ZORAN_DEBUG
+	struct dentry *dbgfs_dir;
+	struct dentry *dbgfs_file;
No need for these, the file is never referenced and the directory can be
looked up when you want to remove it.
quoted
+#endif
[...]
quoted
+#ifdef CONFIG_VIDEO_ZORAN_DEBUG
+	zr->dbgfs_dir = debugfs_create_dir(ZR_DEVNAME(zr), NULL);
+	zr->dbgfs_file = debugfs_create_file("debug", 0444,
+					      zr->dbgfs_dir, zr,
+					      &zoran_debugfs_fops);
+#endif
Wait, when are you removing the files when the device is removed?

That needs to be fixed no matter what before this patch is accepted.
Hello

Sorry to have forgotten this.
I will fix this.

Thanks
Regards
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help