Skip to content

Commit dfecbec

Browse files
Matthew WilcoxSam Ravnborg
Matthew Wilcox
authored and
Sam Ravnborg
committed
kconifg: 'select' considered less evil
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]>
1 parent beda8ae commit dfecbec

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

Documentation/kbuild/kconfig-language.txt

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,15 @@ applicable everywhere (see syntax).
104104
Reverse dependencies can only be used with boolean or tristate
105105
symbols.
106106
Note:
107-
select is evil.... select will by brute force set a symbol
108-
equal to 'y' without visiting the dependencies. So abusing
109-
select you are able to select a symbol FOO even if FOO depends
110-
on BAR that is not set. In general use select only for
111-
non-visible symbols (no prompts anywhere) and for symbols with
112-
no dependencies. That will limit the usefulness but on the
113-
other hand avoid the illegal configurations all over. kconfig
114-
should one day warn about such things.
107+
select should be used with care. select will force
108+
a symbol to a value without visiting the dependencies.
109+
By abusing select you are able to select a symbol FOO even
110+
if FOO depends on BAR that is not set.
111+
In general use select only for non-visible symbols
112+
(no prompts anywhere) and for symbols with no dependencies.
113+
That will limit the usefulness but on the other hand avoid
114+
the illegal configurations all over.
115+
kconfig should one day warn about such things.
115116

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

0 commit comments

Comments
 (0)