Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1270000

Re: [PATCH] ARM: use "depends on" for SoC configs instead of "if" after prompt

From Russell King - ARM Linux <linux@arm.linux.org.uk>
Newsgroups linux.kernel
Subject Re: [PATCH] ARM: use "depends on" for SoC configs instead of "if" after prompt
Date 2015-11-16 12:10 +0100
Message-ID <qvpPA-6yp-5@gated-at.bofh.it> (permalink)
References <qvpwe-6co-23@gated-at.bofh.it> <qvpwe-6co-25@gated-at.bofh.it> <qvpwe-6co-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Nov 16, 2015 at 10:32:51AM +0000, yamada.masahiro@socionext.com wrote:
> Hi Arnd,
> 
>  
> > On Monday 16 November 2015 12:06:10 Masahiro Yamada wrote:
> > > Many ARM sub-architectures use prompts followed by "if" conditional,
> > > but it is wrong.
> > >
> > > Please notice the difference between
> > >
> > >     config ARCH_FOO
> > >             bool "Foo SoCs" if ARCH_MULTI_V7
> > >
> > > and
> > >
> > >     config ARCH_FOO
> > >             bool "Foo SoCs"
> > >             depends on ARCH_MULTI_V7
> > >
> > > These two are *not* equivalent!
> > >
> > > In the former statement, it is not ARCH_FOO, but its prompt that
> > > depends on ARCH_MULTI_V7.  So, it is completely valid that ARCH_FOO is
> > > selected by another, but ARCH_MULTI_V7 is still disabled. As it is not
> > > unmet dependency, Kconfig never warns.  This is probably not what you
> > > want.
> > 
> > Did you encounter a case where someone actually did a 'select' on one of
> > those symbols? I probably introduced a lot of them and did not expect that
> > to happen.
> 
> No, for ARM sub-architectures.
> But, yes for the ARM core part.
> 
> 
> For example, the following entry in arch/arm/Kconfig is suspicous.
> 
> config PCI
>         bool "PCI support" if MIGHT_HAVE_PCI
>         help
>           Find out whether you have a PCI motherboard. PCI is the name of a
>           bus system, i.e. the way the CPU talks to the other stuff inside
>           your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or
>           VESA. If you have PCI, say Y, otherwise N.
> 
> 
> 
> 
> Try "make ARCH=arm footbridge_defconfig" and check the .config file.
> 
> It defines CONFIG_PCI=y, but not CONFIG_MIGHT_HAVE_PCI.
> I am not sure this is a sane .config or not.

It's correct.  "MIGHT_HAVE_PCI" is used by platforms which _might_ _have_
_PCI_, not by platforms which _do_ _have_ _PCI_.  Platforms which _do_
_have_ _PCI_ select PCI directly, and because "MIGHT_HAVE_PCI" is not
set, users are not offered an option that they can never disable.

-- 
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

RE: [PATCH] ARM: use "depends on" for SoC configs instead of "if"  after prompt <yamada.masahiro@socionext.com> - 2015-11-16 11:50 +0100
  Re: [PATCH] ARM: use "depends on" for SoC configs instead of "if"  after prompt Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-11-16 12:10 +0100

csiph-web