linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>,
	Michal Marek <mmarek@suse.cz>,
	linux-kbuild@vger.kernel.org
Subject: Re: Duplicate Kconfig symbol
Date: Mon, 16 Jun 2014 08:04:07 +0200	[thread overview]
Message-ID: <20140616080407.27869160@endymion.delvare> (raw)
In-Reply-To: <20140615175909.GA22479@ravnborg.org>

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

      reply	other threads:[~2014-06-16  6:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140616080407.27869160@endymion.delvare \
    --to=jdelvare@suse.de \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=mmarek@suse.cz \
    --cc=sam@ravnborg.org \
    --cc=yann.morin.1998@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).