mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Jens Axboe <jens.axboe@oracle.com>,
	Jan Engelhardt <jengelh@linux01.gwdg.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Uwe Bugla <uwe.bugla@gmx.de>,
	linux-kernel@vger.kernel.org, Jaroslav Kysela <perex@suse.cz>,
	Mauro Carvalho Chehab <mchehab@infradead.org>
Subject: Re: BUG in 2.6.22-rc2-mm1: Parts of Alsa sound architecture broken
Date: Fri, 08 Jun 2007 11:29:16 +0200	[thread overview]
Message-ID: <s5hy7iu23rn.wl%tiwai@suse.de> (raw)
In-Reply-To: <20070606195308.GB6828@uranus.ravnborg.org>

At Wed, 6 Jun 2007 21:53:08 +0200,
Sam Ravnborg wrote:
> 
> On Wed, Jun 06, 2007 at 09:36:48PM +0200, Jens Axboe wrote:
> > On Tue, Jun 05 2007, Takashi Iwai wrote:
> > > At Tue, 5 Jun 2007 15:25:07 +0200 (MEST),
> > > Jan Engelhardt wrote:
> > > > 
> > > > 
> > > > >> > >Well, I find the change of CONFIG_SND to menuconfig is fine, too.
> > > > >> > >But CONFIG_SND_PCI_DRIVERS and others don't make much sense to me.
> > > > >> > >How is it useful at all?
> > > > >> > 
> > > > >> > Hah, I just tell you some of my own experience.
> > > > >> > In summer 2003, I bought the last new machine, and it got these
> > > > >> > shiny new ports they like to call USB. :)
> > > > >> > I did not have much use for it, but I left it on - you never know
> > > > >> > what standard next is the big win of the decade. And actually,
> > > > >> > it did not took long (well, summer 2005) to get my first USB device.
> > > > >> > Still, I am hell as sure I do not have USB-based sound devices
> > > > >> > anytime soon, so it would be cool to deactivate the whole usbsound
> > > > >> > menu at once. I think I said that in the patch description, did not I?
> > > > >> 
> > > > >> But it's not cool to add an extra config item just for that, too.
> > > > >> And, the structure of menuconfig-if-endif is uglier than menu-endmenu.
> > > > >> That's why I feel a bit uneasy, although all these are a matter of
> > > > >> taste...
> > > > >
> > > > >Forgot to mention about another annoying drawback.  Because of the new
> > > > >CONFIG_SND_*_DRIVERS, you'll have to re-select all belonging
> > > > >CONFIG_SND_*, even via config oldconfig.  Putting the dependency on
> > > > >the top seems to reset the values defined in the old .config.
> > > > 
> > > > Well, *I* (previously) submitted patches with  "default y", but Jens 
> > > > Axboe [http://lkml.org/lkml/2007/5/12/164] disagreed heavily enough to 
> > > > stop that practice.
> > > 
> > > Hm, I guess Jens didn't know about this side-effect.
> > > 
> > > When I don't set "default y", I'll be asked for each belonging item
> > > even though I chose "y" manually for the top config
> > > (CONFIG_*_DRIVERS).
> > > 
> > > Strangely, setting "default y" has no this effect...
> > 
> > That sounds like a bug in the kconfig system. I still think default y is
> > an *awful* idea, but you can read why in the thread referenced above.
> It is the functionality of "default y" that is not understood.
> 
> Take the following simple Kconfig file:
> 
> config FOO
> 	bool "FOO"
> 	default y
> 
> config BAR
> 	bool "BAR"
> 
> What would you expect when you execute "make oldconfig"?
> You would expect to be questioned about both symbols and pressing enter
> would give you the following config:
> CONFIG_FOO=y
> #CONFIG_BAR is not set
> 
> So "default y" in the oldconfig case where we add a symbol gives the
> default value if you just press enter.
> 
> If you use "make menuconfig" and just enter menuconfig and exit and save
> you will end up with exact same configuration as above because menuconfig
> will select default values for all new symbols.
> 
> In other words "default y" has no impact on what oldconfig asks about,
> only what value will be assigned if user decide not to change the value.
> And this is exactly what it is supposed to do and no magic "do not ask user"
> thing. That can be solved by having correct dependencies so if the
> dependencies are not solved one will not be asked.

Well, then "default y" seems sensible for the new additions like this
case (adding a menuconfig top-dependency that was formerly a simple
menu).


Anyway, I think it's another problem of kconfig that it resets the old
values when a new top-config is introduced without "default y".

Assume the following kconfig:

	menu "Foo"
		depends on DOH

	config BAR
		bool "Bar"
		depends on DOH

	endmenu

and an old .config file

	CONFIG_DOH=y
	CONFIG_BAR=y

Now, replace menu with menuconfig:

	menuconfig FOO
		bool "Foo"
		depends on DOH

	if FOO
	config BAR
		bool "Bar"
	endif

Run make oldconfig, and you'll be asked about FOO (as expected).
Answer y, then you'll be asked again about BAR, too.

But, if "default"y is added to FOO,

	menuconfig FOO
		bool "Foo"
		default y
		depends on DOH

then it asks about FOO, but it won't ask you about BAR.


Takashi

  reply	other threads:[~2007-06-08  9:49 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-24 20:00 Uwe Bugla
2007-05-24 20:09 ` Andrew Morton
2007-05-24 20:23   ` Uwe Bugla
2007-05-25 16:01   ` Takashi Iwai
2007-05-25 17:28     ` Andrew Morton
2007-05-25 18:29       ` Uwe Bugla
2007-05-25 21:33       ` Takashi Iwai
2007-05-26 10:51         ` Jan Engelhardt
2007-05-26 14:38           ` Mauro Carvalho Chehab
2007-05-29 16:41           ` Takashi Iwai
2007-05-29 20:18             ` Jan Engelhardt
2007-05-29 20:39               ` Mauro Carvalho Chehab
2007-05-29 21:53                 ` Jan Engelhardt
2007-06-05 12:26               ` Takashi Iwai
2007-06-05 12:50                 ` Takashi Iwai
2007-06-05 13:25                   ` Jan Engelhardt
2007-06-05 14:17                     ` Takashi Iwai
2007-06-05 14:20                       ` Jan Engelhardt
2007-06-05 14:31                         ` Takashi Iwai
2007-06-06 19:36                       ` Jens Axboe
2007-06-06 19:53                         ` Sam Ravnborg
2007-06-08  9:29                           ` Takashi Iwai [this message]
2007-05-26 10:39       ` Jan Engelhardt
2007-05-26 10:40         ` [PATCH 01/04] Use menuconfig objects 3 - sound Jan Engelhardt
2007-05-26 10:40         ` [PATCH 02/04] Use menuconfig objects 3 - sound/alsa Jan Engelhardt
2007-05-26 10:41         ` [PATCH 03/04] Use menuconfig objects 3 - sound/alsa/more Jan Engelhardt
2007-05-26 10:41         ` [PATCH 04/04] Use menuconfig objects 3 - sound/oss Jan Engelhardt

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=s5hy7iu23rn.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=jengelh@linux01.gwdg.de \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=perex@suse.cz \
    --cc=sam@ravnborg.org \
    --cc=uwe.bugla@gmx.de \
    /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

all inboxes | Powered by JetHome®