Messages in this thread | | | Subject | Re: [PATCH] [RFC] clk: sprd: fix compile-testing | From | Stephen Boyd <> | Date | Fri, 10 Apr 2020 19:27:26 -0700 |
| |
Quoting Chunyan Zhang (2020-04-09 20:45:16) > We see this broken because I shouldn't leave clk Makefile a tristate > compile [1] after changing ARCH_SPRD to be tristate. > > If we will make ARCH_SPRD tristate-able in the future and you all > aggree that, I would like to do it now, and pay more attention to > Makefiles and dependencies. > > I can also make a change like below: > > diff --git a/drivers/clk/sprd/Kconfig b/drivers/clk/sprd/Kconfig > index e18c80fbe804..9f7d9d8899a5 100644 > --- a/drivers/clk/sprd/Kconfig > +++ b/drivers/clk/sprd/Kconfig > @@ -2,6 +2,7 @@ > config SPRD_COMMON_CLK > tristate "Clock support for Spreadtrum SoCs" > depends on ARCH_SPRD || COMPILE_TEST > + depends on m || ARCH_SPRD != m > default ARCH_SPRD > select REGMAP_MMIO > > Arnd, Stephen, Sandeep, what do you think? Does that make sense?
Sorry, doesn't make any sense to me. The ARCH_FOO configs for various platforms are intended to be used to limit the configuration space of various other Kconfig symbols for the code that only matters to those platforms. The usage of depends and default is correct here already. The ARCH_FOO configs should always be bool. Any code bloat problems seen by config symbols enabling because they're 'default ARCH_FOO' can be resolved by explicitly disabling those configs.
| |