linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* what means duplicate "config" entries in Kconfig file?
@ 2003-04-09 12:30 Robert P. J. Day
  2003-04-09 16:08 ` Randy.Dunlap
  2003-04-09 16:23 ` Roman Zippel
  0 siblings, 2 replies; 5+ messages in thread
From: Robert P. J. Day @ 2003-04-09 12:30 UTC (permalink / raw)
  To: Linux kernel mailing list


  [i just tried to email the Kconfig maintainer, but sendmail
suggested that that mail might not have gotten through, so i'll
toss this out here.]

  in my quest to clean up even more kernel config menus,
i ran across the following oddity in arch/i386/Kconfig:

-----

config MCA
	bool "MCA support"
	depends on !(X86_VISWS || X86_VOYAGER)
	help
	  MicroChannel Architecture is found in some IBM PS/2 machines and
	  laptops.  It is a bus system similar to PCI or ISA. See
	  <file:Documentation/mca.txt> (and especially the web page given
	  there) before attempting to build an MCA bus kernel.

config MCA
	depends on X86_VOYAGER
	default y if X86_VOYAGER

source "drivers/mca/Kconfig"

-----

  i'm not sure what it means to have two config entries with 
identical symbols.  can someone clarify this?  i'm just confused
(which should not come as a surprise at this point).

rday

p.s.  and i'm open to where i should be emailing those patches
if this list is not the right place.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: what means duplicate "config" entries in Kconfig file?
  2003-04-09 12:30 what means duplicate "config" entries in Kconfig file? Robert P. J. Day
@ 2003-04-09 16:08 ` Randy.Dunlap
  2003-04-09 16:23 ` Roman Zippel
  1 sibling, 0 replies; 5+ messages in thread
From: Randy.Dunlap @ 2003-04-09 16:08 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: linux-kernel

On Wed, 9 Apr 2003 08:30:34 -0400 (EDT) "Robert P. J. Day" <rpjday@mindspring.com> wrote:

|   [i just tried to email the Kconfig maintainer, but sendmail
| suggested that that mail might not have gotten through, so i'll
| toss this out here.]
| 
|   in my quest to clean up even more kernel config menus,
| i ran across the following oddity in arch/i386/Kconfig:
| 
| -----
| 
| config MCA
| 	bool "MCA support"
| 	depends on !(X86_VISWS || X86_VOYAGER)
| 	help
| 	  MicroChannel Architecture is found in some IBM PS/2 machines and
| 	  laptops.  It is a bus system similar to PCI or ISA. See
| 	  <file:Documentation/mca.txt> (and especially the web page given
| 	  there) before attempting to build an MCA bus kernel.
| 
| config MCA
| 	depends on X86_VOYAGER
| 	default y if X86_VOYAGER
| 
| source "drivers/mca/Kconfig"
| 
| -----
| 
|   i'm not sure what it means to have two config entries with 
| identical symbols.  can someone clarify this?  i'm just confused
| (which should not come as a surprise at this point).


This should be OK.  The "depends" clauses are different,
so in the second case, MCA defaults to set/enabled for X86_VOYAGER
(forced, not a user option),
and in the first case, MCA is a user config option.


--
~Randy

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: what means duplicate "config" entries in Kconfig file?
  2003-04-09 12:30 what means duplicate "config" entries in Kconfig file? Robert P. J. Day
  2003-04-09 16:08 ` Randy.Dunlap
@ 2003-04-09 16:23 ` Roman Zippel
  2003-04-09 16:43   ` Robert P. J. Day
  1 sibling, 1 reply; 5+ messages in thread
From: Roman Zippel @ 2003-04-09 16:23 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: Linux kernel mailing list

Hi,

On Wed, 9 Apr 2003, Robert P. J. Day wrote:

>   [i just tried to email the Kconfig maintainer, but sendmail
> suggested that that mail might not have gotten through, so i'll
> toss this out here.]

I did already answer privately, but in case anyone is interested in the 
answer...

>   i'm not sure what it means to have two config entries with 
> identical symbols.  can someone clarify this?  i'm just confused
> (which should not come as a surprise at this point).

You can have as much entries as you want, the only limit is that you can
only have one user prompt per config entry and the type must not conflict.
This example could have been done with a single entry and this is usually
prefered to keep it more compact, but you don't have to.

> p.s.  and i'm open to where i should be emailing those patches
> if this list is not the right place.

You can Cc: me if you want, but I can mostly only comment on technical 
aspects. The subsystem/driver maintainer has the final decision.

bye, Roman


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: what means duplicate "config" entries in Kconfig file?
  2003-04-09 16:23 ` Roman Zippel
@ 2003-04-09 16:43   ` Robert P. J. Day
  2003-04-09 19:54     ` Roman Zippel
  0 siblings, 1 reply; 5+ messages in thread
From: Robert P. J. Day @ 2003-04-09 16:43 UTC (permalink / raw)
  To: Roman Zippel; +Cc: Linux kernel mailing list

On Wed, 9 Apr 2003, Roman Zippel wrote:

> On Wed, 9 Apr 2003, Robert P. J. Day wrote:
 
> >   i'm not sure what it means to have two config entries with 
> > identical symbols.  can someone clarify this?  i'm just confused
> > (which should not come as a surprise at this point).
> 
> You can have as much entries as you want, the only limit is that you can
> only have one user prompt per config entry and the type must not conflict.
> This example could have been done with a single entry and this is usually
> prefered to keep it more compact, but you don't have to.

not to belabor this, but what does it mean when the two dependencies
are mutually exclusive, as in the example i provided:

-----------------------

config MCA
        bool "MCA support"
        depends on !(X86_VISWS || X86_VOYAGER)
        help
          MicroChannel Architecture is found in some IBM PS/2 machines and
          laptops.  It is a bus system similar to PCI or ISA. See
          <file:Documentation/mca.txt> (and especially the web page given
          there) before attempting to build an MCA bus kernel.

config MCA
        depends on X86_VOYAGER
        default y if X86_VOYAGER

---------------------

  the two options X86_VISWS and X86_VOYAGER are simple "bool"s
representing the (radio-box) subarchitecture type.

  the first seems to represent a dependency of *neither* of those
two listed options, while the second config *depends* on one of 
them.  

  how exactly do you reconcile what looks like contradictory
dependencies for the same config entry?

rday,
wondering just how badly he's embarrassing himself by now ...


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: what means duplicate "config" entries in Kconfig file?
  2003-04-09 16:43   ` Robert P. J. Day
@ 2003-04-09 19:54     ` Roman Zippel
  0 siblings, 0 replies; 5+ messages in thread
From: Roman Zippel @ 2003-04-09 19:54 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: Linux kernel mailing list

Hi,

On Wed, 9 Apr 2003, Robert P. J. Day wrote:

>   the two options X86_VISWS and X86_VOYAGER are simple "bool"s
> representing the (radio-box) subarchitecture type.
> 
>   the first seems to represent a dependency of *neither* of those
> two listed options, while the second config *depends* on one of 
> them.  
> 
>   how exactly do you reconcile what looks like contradictory
> dependencies for the same config entry?

With config entries you mainly define menu prompts and defaults. 
Dependencies are now properties of these prompts and defaults. With "if" 
you can define dependencies which are only attached to these prompts or 
defaults. Dependencies defined with "depends on" are attached to all of 
them defined within this menu entry.
Internally this becomes a simple list:

config MCA
  +- prompt "MCA support"
  |    +- depends on !(X86_VISWS || X86_VOYAGER)
  +- default y
       +- depends on X86_VOYAGER

If you enable the debug option of xconfig, this list is displayed with the 
help text.

bye, Roman


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-04-09 19:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-09 12:30 what means duplicate "config" entries in Kconfig file? Robert P. J. Day
2003-04-09 16:08 ` Randy.Dunlap
2003-04-09 16:23 ` Roman Zippel
2003-04-09 16:43   ` Robert P. J. Day
2003-04-09 19:54     ` Roman Zippel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).