Linux Input/HID development
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jiri Kosina <jkosina@suse.cz>, Adrian Bunk <bunk@kernel.org>,
	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: select validation (was: Re: [2.6 patch] HID: fix default building of all quirky devices)
Date: Thu, 16 Oct 2008 10:06:41 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0810161002240.25933@anakin> (raw)
In-Reply-To: <alpine.LFD.2.00.0810151002120.3288@nehalem.linux-foundation.org>

On Wed, 15 Oct 2008, Linus Torvalds wrote:
> On Wed, 15 Oct 2008, Jiri Kosina wrote:
> > Hmm ... I am not really sure, isn't this a bug in Kconfig?
> 
> Not really, more of a misfeature.
> 
> That said, even if we were to consider it a bug, Adrian's patch is 
> obviously the better way to do it. You shouldn't do non-local dependencies 
> (have one config option select fifty other ones), when the local ones are 
> clearer and more readable (have one config option just describe its *own* 
> dependencies).
> 
> Don't get me wrong - select is very useful, but not for "should I ask this 
> question or not". The point to use select is when you have some library or 
> other common infrastructure that isn't worth a question of its own (eg 
> "Why the hell would the user want to care whether he needs CRC32 
> routines?"), and some code says "I will need this infrastructure" by just 
> saying "select CRC32" to let the build system know that it needs that 
> particular piece of functionality.
> 
> In other words, "select" is kind of a "depends on", but for things that it 
> is insane to ask. It would be totally _idiotic_ to ask a user "do you want 
> to have CRC32 routines in the kernel?" and then based on that say "ok, you 
> didn't ask for CRC32, so now you cannot use the AX88796 network driver".
> 
> See? THAT is what "select" is for. And when you use select, the way we do 
> things now, you have to select everything you need. You cannot assume that 
> it will recursively select whatever it needs.
> 
> And notice how you mis-use select. That's not how to disable a question. A 
> question gets disabled by just doing an "if xyz" on the question itself, 
> like Adrian did.

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.

And doing it dynamically (you should not use select to enable something that
has dependencies that are (currently) not fulfilled) wouldn't find all
incorrect usages.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

  parent reply	other threads:[~2008-10-16  8:07 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         ` Geert Uytterhoeven [this message]
2008-10-16 18:47           ` select validation (was: Re: [2.6 patch] HID: fix default building of all quirky devices) Linus Torvalds
2008-10-16 19:31             ` Adrian Bunk

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=Pine.LNX.4.64.0810161002240.25933@anakin \
    --to=geert@linux-m68k.org \
    --cc=bunk@kernel.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