Helmut, On Fri, 16 Aug 2019, Helmut Grohne wrote: > I also note that there are likely more instances for this pattern. > Should they be fixed in a similar way? You can find a lot using the > following incantation: > > $ git describe --tags > v5.3-rc4 > $ git ls-files -- "*/Kconfig" | xargs git grep --cached 'bool .* if > COMPILE_TEST$' -- | wc -l > 185 > $ > > Seems like an anti-pattern to me. It is particularly common in the > clocksource subtree.
After some rumaging I figured out that the idea behind this is that the platforms which need those clocksources use 'select $CLOCKSOURCE' which works despite the 'if COMPILE_TEST'. The 'if COMPILE_TEST' is there to hide the config option when there is no platform which needs it and expose it for compile test purposes. So if your particular platform does not use 'select ARM_TIMER_SP804' then the right fix is to add it to that platform. Thanks, tglx