Skip to content

Commit

Permalink
kconifg: 'select' considered less evil
Browse files Browse the repository at this point in the history
While select should be used with care, it is not actually evil.

Signed-off-by: Matthew Wilcox <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
  • Loading branch information
Matthew Wilcox authored and Sam Ravnborg committed Apr 28, 2008
1 parent beda8ae commit dfecbec
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions Documentation/kbuild/kconfig-language.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,15 @@ applicable everywhere (see syntax).
Reverse dependencies can only be used with boolean or tristate
symbols.
Note:
select is evil.... select will by brute force set a symbol
equal to 'y' without visiting the dependencies. So abusing
select you are able to select a symbol FOO even if FOO depends
on BAR that is not set. In general use select only for
non-visible symbols (no prompts anywhere) and for symbols with
no dependencies. That will limit the usefulness but on the
other hand avoid the illegal configurations all over. kconfig
should one day warn about such things.
select should be used with care. select will force
a symbol to a value without visiting the dependencies.
By abusing select you are able to select a symbol FOO even
if FOO depends on BAR that is not set.
In general use select only for non-visible symbols
(no prompts anywhere) and for symbols with no dependencies.
That will limit the usefulness but on the other hand avoid
the illegal configurations all over.
kconfig should one day warn about such things.

- numerical ranges: "range" <symbol> <symbol> ["if" <expr>]
This allows to limit the range of possible input values for int
Expand Down

0 comments on commit dfecbec

Please sign in to comment.