Re: [PATCH 00/11] drm: Restore helper usability
From: Arnd Bergmann
Date: Mon Apr 22 2024 - 14:24:23 EST
On Mon, Apr 22, 2024, at 18:58, Geert Uytterhoeven wrote:
> On Mon, Apr 22, 2024 at 3:55 PM Arnd Bergmann <arnd@xxxxxxxx> wrote:
>> On Mon, Apr 22, 2024, at 15:28, Jani Nikula wrote:
>> Whereas this one is broken:
>>
>> config FEATURE_A
>> tristate "user visible if I2C is enabled"
>> depends on I2C
>>
>> config HELPER_B
>> tristate # hidden
>> select FEATURE_A
>>
>> config DRIVER
>> tristate "This driver is broken if I2C is disabled"
>> select HELPER_B
>
> So the DRIVER section should gain a "depends on I2C" statement.
That is of course the common workaround, but my point was
that nothing should ever 'select I2C' or any of the other
subsystems that are user visible.
> Yamada-san: would it be difficult to modify Kconfig to ignore symbols
> like DRIVER that select other symbols with unmet dependencies?
> Currently it already warns about that.
>
> Handling this implicitly (instead of the current explict "depends
> on") would have the disadvantage though: a user who is not aware of
> the implicit dependency may wonder why DRIVER is invisible in his
> config interface.
I think hiding this would make it much harder to get anything
right. The symbols in question are almost all ones that should
be enabled in normal configs, and the 'make menuconfig' help
doesn't make it too hard to figure things out normally, we just
have to find a way to avoid regressions when converting things
to 'depends on' that used an incorrect 'select'.
Arnd