public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* Duplicate Kconfig symbol
@ 2014-06-15 16:19 Jean Delvare
  2014-06-15 17:59 ` Sam Ravnborg
  0 siblings, 1 reply; 3+ messages in thread
From: Jean Delvare @ 2014-06-15 16:19 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Michal Marek, linux-kbuild

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.
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.

Thanks,
-- 
Jean Delvare
SUSE L3 Support

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Duplicate Kconfig symbol
  2014-06-15 16:19 Duplicate Kconfig symbol Jean Delvare
@ 2014-06-15 17:59 ` Sam Ravnborg
  2014-06-16  6:04   ` Jean Delvare
  0 siblings, 1 reply; 3+ messages in thread
From: Sam Ravnborg @ 2014-06-15 17:59 UTC (permalink / raw)
  To: Jean Delvare; +Cc: Yann E. MORIN, Michal Marek, linux-kbuild

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Duplicate Kconfig symbol
  2014-06-15 17:59 ` Sam Ravnborg
@ 2014-06-16  6:04   ` Jean Delvare
  0 siblings, 0 replies; 3+ messages in thread
From: Jean Delvare @ 2014-06-16  6:04 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Yann E. MORIN, Michal Marek, linux-kbuild

Hi Sam,

On Sun, 15 Jun 2014 19:59:09 +0200, Sam Ravnborg wrote:
> 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.

My testing indicates that the first declaration of HISAX_AVM_A1_PCMCIA
wins. If I add a prompt to the second declarations, it shows up in the
menu and the help prints both prompts each with its location, so the
second declaration not completely ignored, but the dependencies are
taken from the first declaration.

> 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.

Then can we at least have Kconfig complain when a symbol is defined
more than once in a given file?

Thanks,
-- 
Jean Delvare
SUSE L3 Support

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-16  6:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-15 16:19 Duplicate Kconfig symbol Jean Delvare
2014-06-15 17:59 ` Sam Ravnborg
2014-06-16  6:04   ` Jean Delvare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox