On Mon, 18 Mar 2024, "Luca Weiss" <luca.weiss@xxxxxxxxxxxxx> wrote: > Would you know the correct fix for this? I'm aware of the pattern > "select FOO || !FOO" but I guess it's also not applicable here? I don't think that pattern works for select, only for depends on. And I think the problem, again, is the abuse of select for symbols with dependencies. $ git grep "select DRM_KMS_HELPER" | wc -l 122 I'm guessing these only work because a) they are tristates, and b) they directly or indirectly already "depends on DRM", which satisfies DRM_KMS_HELPER's "depends on DRM". I think the correct fix for this, and a plethora of other kconfig problems, is adhering to the note in Documentation/kbuild/kconfig-language.rst: Note: select should be used with care. select will force a symbol to a value without visiting the dependencies. By abusing select you are able to select a symbol FOO even if FOO depends on BAR that is not set. In general use select only for non-visible symbols (no prompts anywhere) and for symbols with no dependencies. That will limit the usefulness but on the other hand avoid the illegal configurations all over. The downsides are that it's a lot of churn to fix them, they'll creep back in, and kconfig doesn't warn about these cases up front while it could, and menuconfig etc. aren't helpful in enabling dependencies for you recursively. So here we are, adding bandaid year after year. :( BR, Jani. -- Jani Nikula, Intel