Re: Duplicate Kconfig symbol

Sam Ravnborg
2014-06-15T17:59:27Z

On Sun, Jun 15, 2014 at 06:19:06PM +0200, Jean Delvare wrote:
> Hi Yann, all,
>
> HISAX_AVM_A1_PCMCIA is declared twice in drivers/isdn/hisax/Kconfig. As
> a bool both times, but with different defaults and dependencies.
>
> As far as I can see, Kconfig simply ignores the second declaration.
No - the second declaration wins.
This is on purpose so an arch can override some generic symbol.
This is used in a lot of places.
People often add definitions to all archs rahter than a single generic place :-(

> I'll send a patch to the maintainer of the ISDN subsystem, but
> couldn't/shouldn't Kconfig complain about the second declaration,
> instead of ignoring it? That would let us spot such errors much earlier.
HISAX_AVM_A1_PCMCIA should not appear twice in the same file - so
please have this fixed.

Sam