[PATCH RFC 1/3] spmi: Linux driver framework for SPMI

Greg Kroah-Hartman gregkh at linuxfoundation.org
Fri Aug 16 15:58:49 EDT 2013


On Fri, Aug 16, 2013 at 02:47:15PM -0500, Josh Cartwright wrote:
> > > +#ifdef CONFIG_DEBUG_FS
> > 
> > Why?  If debugfs isn't enabled, the functions should just compile away
> > with the debugfs_() calls, so no need to do this type of thing here,
> > right?
> 
> Not sure I follow you, but it may be because this is a bit misleading.
> 
> Currently CONFIG_DEBUG_FS is being extended to also mean "do you want
> the SPMI core to create device entries?".  It would probably make more
> sense to have a CONFIG_SPMI_DEBUG option which is def_bool DEBUG_FS, as
> other busses have.
> 
> The #ifdef here would then be #ifdef CONFIG_SPMI_DEBUG, as well as in
> the Makefile:
> 
>   spmi-core-$(CONFIG_SPMI_DEBUG) += spmi-dbgfs.o

If debugfs is enabled why wouldn't you want debugfs entries for your
devices?  Don't assume a user is going to be able to rebuild their
kernel just for debugging stuff (hint, they usually aren't), so having
these present, if they don't cause any performance issues, is usually
best to always have around.

thanks,

greg k-h



More information about the linux-arm-kernel mailing list