Re: [PATCH] drm/bridge: fix RC_CORE dependency

From: Andrzej Hajda
Date: Fri Jul 19 2019 - 05:50:41 EST


On 19.07.2019 10:33, Arnd Bergmann wrote:
> On Fri, Jul 19, 2019 at 9:01 AM Andrzej Hajda <a.hajda@xxxxxxxxxxx> wrote:
>> On 18.07.2019 15:42, Arnd Bergmann wrote:
>>> Using 'imply' causes a new problem, as it allows the case of
>>> CONFIG_INPUT=m with RC_CORE=y, which fails to link:
>>
>> I have reviewed dependencies and I wonder how such configuration is
>> possible at all.
>>
>> RC_CORE depends on INPUT (at least on today's next branch) so if INPUT=m
>> then RC_CORE should be either n either m, am I right?
> Right.
>
>> Arnd, are there unknown to me changes in RC/INPUT dependencies?
> I think this is 'imply' behaving oddly when we have conflicting requirements:
>
> - INPUT=m forces RC_CORE to be =m or =n
> - DRM_SIL_SII8620=y asks RC_CORE to be =y unless it cannot be enabled
>
> Kconfig decided to make this RC_CORE=y, which caused the link
> failure. Making it RC_CORE=m however would not work either because
> then we'd get a link failure from the sii8620 driver to rc_core.
>
> so a pure 'imply' cannot work here, and we need a dependency, one of:
>
> a)
> depends on INPUT || !INPUT
> select RC_CORE if INPUT
>
> b) depends on RC_CORE || !RC_CORE
>
> b) is what othe drivers use, e.g. SMS_SDIO_DRV


OK, thanks for explanation, really weird.

I though about imply as "weak dependency", but it is "weak select" with
drawbacks of select.

Anyway I am surprised that Kconfig did not complain about contradictory
requirements on RC_CORE symbol.


Regards

Andrzej


>
> Arnd
>