On Sat Jan 17, 2026 at 10:52 PM CET, Timur Tabi wrote: > On Sat, 2026-01-17 at 22:35 +0100, Danilo Krummrich wrote: >> > You don't want the debugfs entries created by default? That's how it is >> > in Nouveau. >> >> I think it's OK to always have the entries on keeping them beyond device >> unbind >> has to be behind a Kconfig option. >> >> I thought you want this behind a Kconfig in general, otherwise what is >> debugfs::Dir::empty() for? > > Oh, I see what you're saying. Dir::empty() is for when CONFIGFS_DEBUG_FS is > disabled. So > obviously, I should not default DEBUGFS_ROOT to Some(dir) if > CONFIGFS_DEBUG_FS is disabled.
This case is already handled, look at how debugfs::Dir::create() [1] is implemented. I.e. it is fully transparent and you don't have to care about this case. debugfs::Dir::empty() would be useful if you have an additional case where you want to have a debugfs file tree conditionally though, which is why I assumed you wanted an additional Kconfig for nova-core. [1] https://rust.docs.kernel.org/src/kernel/debugfs.rs.html#53
