...-----Original Message-----
From: John Hubbard [mailto:jhubbard@xxxxxxxxxx]
config GUP_BENCHMARKbenchmarking"
bool "Enable infrastructure for get_user_pages() and related calls
+ depends on DEBUG_FS
I think "select DEBUG_FS" is better here. "depends on" has the obnoxious
behavior of hiding the choice from you, if the dependencies aren't already met.
Whereas what the developer *really* wants is a no-nonsense activation of the
choice: "enable GUP_BENCHMARK and the debug fs that it requires".
To some extent, I agree with you. But I still think here it is better to use "depends on".
According to
https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt
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.
On the other hand, in kernel there are 78 "depends on DEBUG_FS" and
only 14 "select DEBUG_FS".