On 1/30/26 3:58 PM, Gary Guo wrote:
> On Fri Jan 30, 2026 at 11:36 PM GMT, Timur Tabi wrote:
>> On Wed, 2026-01-28 at 20:28 -0600, Timur Tabi wrote:
...
> However, when debugfs is enabled, but CONFIG_NOVA_CORE_DEBUGFS=n, then using
> debugfs functionalities would *not* be compiled out (so, for the 
> `Dir::empty()`
> patch in the previous iteration, all of the debugging facility would still be
> around with CONFIG_DEBUG_FS=y and CONFIG_NOVA_CORE_DEBUGFS=n, which is not
> desirable).
> 
> The straightforward solution is thus sprinkle 
> `#[cfg(CONFIG_NOVA_CORE_DEBUGFS)]`
> everywhere where debugfs is touched, which is non-ideal.

Another straightforward solution is to not have CONFIG_NOVA_CORE_DEBUGFS
at all! Just use CONFIG_DEBUG_FS. That cleans up everything nicely.

Furthermore, that appears to be how quite a few other drivers do it,
too: a quick search reports 117 uses of CONFIG_DEBUG_FS across
84 files in drivers/gpu/ alone, and zero major DRM GPU drivers with 
a *_DEBUGFS config option.

So I don't see a need for this granular per-driver approach, for
this feature.


thanks,
-- 
John Hubbard

Reply via email to