From: Adrian Bunk <bunk@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
Jiri Kosina <jkosina@suse.cz>,
zippel@linux-m68k.org, sam@ravnborg.org,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Jiri Slaby <jirislaby@gmail.com>,
Mauro Carvalho Chehab <mchehab@redhat.com>
Subject: Re: select validation (was: Re: [2.6 patch] HID: fix default building of all quirky devices)
Date: Thu, 16 Oct 2008 22:31:03 +0300 [thread overview]
Message-ID: <20081016193103.GC22554@cs181140183.pp.htv.fi> (raw)
In-Reply-To: <alpine.LFD.2.00.0810161133150.3288@nehalem.linux-foundation.org>
On Thu, Oct 16, 2008 at 11:47:55AM -0700, Linus Torvalds wrote:
>
>
> On Thu, 16 Oct 2008, Geert Uytterhoeven wrote:
> >
> > Would it be possible for kconfig to check for invalid usage of select?
> >
> > Like you should not use select to enable something that has
> > dependencies. However, that would fail in case both the selector option
> > and the selected option depend on the same.
>
> Well, at least in theory you may actually want to select something that
> has dependencies, even if you don't want to select the dependencies.
>
> For example, some feature may be enabled by default on some architecture
> or with some config. Example:
>
> bool SUPPORT_FEATURE
> default y
> depends on EXPERIMENTAL
> depends on !EMBEDDED
> depends on X86
>
> which is just another way of saying
>
> bool SUPPORT_FEATURE
> default X86 && !EMBEDDED && EXPERIMENTAL
Such constructs without a prompt are for a different usecase than what
you have in mind, there wouldn't be EXPERIMENTAL or EMBEDDED in the
dependencies, this is used for stuff like
config X86_HT
bool
depends on SMP
depends on (X86_32 && !X86_VOYAGER) || X86_64
default y
And that's usually not the kind of symbol that should get selected.
In reality your example would be:
config SUPPORT_FEATURE
bool "support feature" if EMBEDDED
default y
depends on X86 && EXPERIMENTAL
> and it's still possible that some code wants to do a
>
> select SUPPORT_FEATURE
>
> because the dependency isn't a _code_ dependency, it's a default-value
> dependency.
>...
I'd be more concerned about dependencies that are used to make the
kconfig UI better.
Dependencies on options like NETDEV_1000 are not code dependencies.
> Linus
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
prev parent reply other threads:[~2008-10-16 19:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-15 4:13 usbhid_set_leds problems Adrian Bunk
2008-10-15 5:05 ` Adrian Bunk
2008-10-15 7:13 ` Jiri Kosina
2008-10-15 7:30 ` [2.6 patch] HID: fix default building of all quirky devices Adrian Bunk
2008-10-15 7:43 ` Jiri Kosina
2008-10-15 10:20 ` Adrian Bunk
2008-10-15 17:09 ` Linus Torvalds
2008-10-15 17:17 ` Linus Torvalds
2008-10-15 17:32 ` Adrian Bunk
2008-10-15 17:43 ` Linus Torvalds
2008-10-15 22:54 ` Jiri Kosina
2008-10-16 8:06 ` select validation (was: Re: [2.6 patch] HID: fix default building of all quirky devices) Geert Uytterhoeven
2008-10-16 18:47 ` Linus Torvalds
2008-10-16 19:31 ` Adrian Bunk [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=20081016193103.GC22554@cs181140183.pp.htv.fi \
--to=bunk@kernel.org \
--cc=geert@linux-m68k.org \
--cc=jirislaby@gmail.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@redhat.com \
--cc=sam@ravnborg.org \
--cc=torvalds@linux-foundation.org \
--cc=zippel@linux-m68k.org \
/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