Hi Arnd, On Thu, Sep 12, 2019 at 2:59 PM Arnd Bergmann <a...@arndb.de> wrote: > > On Thu, Sep 12, 2019 at 12:18 AM Amit Kucheria <amit.kuche...@linaro.org> > wrote: > > > > I was using initcall_debugging on a QCOM platform and ran across a bunch of > > driver initcalls that are enabled even if their SoC support is disabled. > > > > Here are some fixups for a subset of them. > > The idea seems reasonable, disabling a platform may just turn off > all the drivers that are not useful elsewhere, but there are mistakes > in a lot of your changes, so I'm certainly not applying these for 5.4.
OK, thanks for confirming that you have no objections to such changes, per-se. I'll spend some more time ensuring COMPILE_TEST coverage for these cleanups. I only focused on quickly cleaning up my initcall_debug output for now. > Generally speaking, the way that works best is > > config SUBSYS_DRIVER_FOO > tristate "SUBSYS support for FOO platform" > depends on ARCH_FOO || COMPILE_TEST > depends on SUBSYS > default "m" if ARCH_FOO > > This means it's enabled as a loadable module by default (use > default "y" instead where necessary) as long as the platform > is enabled, but an x86 allmodconfig build also includes it > because of COMPILE_TEST, while any configuration without > ARCH_FOO that is not compile-testing cannot enable it. How would you like to handle defconfigs which list a driver explicitly? Should we add ARCH_FOO to those defconfigs or remove DRIVER_FOO from them? Regards, Amit