mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Al Boldi <a1426z@gawab.com>
To: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/30] Use menuconfig objects
Date: Wed, 11 Apr 2007 21:32:36 +0300	[thread overview]
Message-ID: <200704112132.36542.a1426z@gawab.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0704110937060.32056@yvahk01.tjqt.qr>

Jan Engelhardt wrote:
> On Apr 11 2007 07:42, Al Boldi wrote:
> >Jan Engelhardt wrote:
> >
> >Correct, no oversight here; but it may be more meaningful, if you could
> >default select child-options based on the parent-state, like HW_RANDOM.
>
> A symbol will already have the 'magic' you describe if its creator wrote
> it that way. Changing to 'menuconfig' tokens does not change that I
> think. Consider:
>
> menu "foobar"
> config FOOBAR
>   bool "foobar"
>   default y
>
> config HW_RANDOM
>   depends on FOOBAR
>   default y
>
> endmenu
>
> This example should do things as you describe -- if FOOBAR is changed
> from n to y, HW_RANDOM should automatically do the same since it is a
> new option then.

I don't think so. But this might:

menu "foobar"
 config FOOBAR
   bool "foobar"
   default y

 config HW_RANDOM
   depends on FOOBAR
   default FOOBAR

endmenu

>
> menuconfig FOOBAR
>   bool "foobar"
>   default y
>
> if FOOBAR
>
> config HW_RANDOM
>   default y
>
> endif
>
> inhibits the same behavior AFAICS.

I think you mean "exhibits"?

>
> >Also, I don't think it's necessary to touch any of the "depends on"; keep
> >them as is, as they don't hurt staying that way, and may actually be
> >necessary under certain circumstances.  (see EMBEDDED)
>
> Simplifying the depends lines is a good thing IMO.

You are replacing the depends with an if block, which seems to add 
complexity, as we now have two constructs, if and depends.

IMHO, leave the depends as is, for simplicity and correctness and 
maintainability.

So if we have something like this:

menu "foobar"
 config FOOBAR
   bool "foobar"
   default y

 config FOOBAR_SUB1
   tristate "FOOBAR SUB1"
   depends on FOOBAR
   default m

 config FOOBAR_SUB2
   bool "FOOBAR SUB2"
   depends on FOOBAR
   default y

endmenu

Change it to something like this:

menuconfig FOOBAR
   tristate "foobar"
   default y

 config FOOBAR_SUB1
   tristate "FOOBAR SUB1"
   depends on FOOBAR
   default FOOBAR

 config FOOBAR_SUB2
   bool "FOOBAR SUB2"
   depends on FOOBAR
   default FOOBAR

without any if blocks, and maybe even in its own Kconfig.


Thanks!

--
Al

  parent reply	other threads:[~2007-04-11 18:29 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-10 22:12 Al Boldi
2007-04-10 22:30 ` Jan Engelhardt
2007-04-11  4:42   ` Al Boldi
2007-04-11  7:48     ` Jan Engelhardt
2007-04-11 16:53       ` Stefan Richter
2007-04-11 17:05         ` Jan Engelhardt
2007-04-11 17:30         ` Sam Ravnborg
2007-04-11 18:32       ` Al Boldi [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-04-10 19:17 Jan Engelhardt
2007-04-10 22:04 ` Stefan Richter
2007-04-10 21:40   ` David Lang
2007-04-10 22:41     ` Stefan Richter
2007-04-10 22:09   ` Jan Engelhardt
2007-04-10 23:19     ` Adrian Bunk
2007-04-11  5:52       ` Robert P. J. Day
2007-04-12 22:50 ` Andrew Morton
2007-04-12 23:07   ` Randy Dunlap
2007-04-12 23:18     ` Jan Engelhardt
2007-04-12 23:30       ` Randy Dunlap
2007-04-12 23:16   ` Jan Engelhardt
2007-04-12 23:35     ` Andrew Morton
2007-04-13  9:50 ` Jean Delvare
2007-04-13 16:02   ` Jan Engelhardt
2007-05-10 22:38 ` Andrew Morton
2007-05-11  6:05   ` Jan Engelhardt
2007-05-11  6:18     ` Andrew Morton
2007-05-11  7:47       ` 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=200704112132.36542.a1426z@gawab.com \
    --to=a1426z@gawab.com \
    --cc=jengelh@linux01.gwdg.de \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®