Re: unnecessary "tristate"ness in Kconfig files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 13 Feb 2008 11:46:00 -0500 (EST) Robert P. J. Day wrote:

> 
>   can someone correct me if my thinking is out of whack here?
> consider init/Kconfig:
> 
> ...
> config IKCONFIG
>         tristate "Kernel .config support"
>         ---help---
>           This option enables the complete Linux kernel ".config" file
>           contents to be saved in the kernel. It provides documentation
>           of which kernel options are used in a running kernel or in an
>           on-disk kernel.  This information can be extracted from the kernel
>           image file with the script scripts/extract-ikconfig and used as
>           input to rebuild the current kernel or to build another kernel.
>           It can also be extracted from a running kernel by reading
>           /proc/config.gz if enabled (below).
> 
> config IKCONFIG_PROC
>         bool "Enable access to .config through /proc/config.gz"
>         depends on IKCONFIG && PROC_FS
>         ---help---
>           This option enables access to the kernel configuration file
>           through /proc/config.gz.
> ...
> 
>   now why is IKCONFIG tristate instead of simple bool?  it's used
> solely as a dependency for IKCONFIG_PROC, and that's used in
> kernel/configs.c thusly:
> 
> ...
> #ifdef CONFIG_IKCONFIG_PROC
> ...
> #endif
> ...

and it's used in kernel/Makefile:

obj-$(CONFIG_IKCONFIG) += configs.o

>   so it's easy to see that it should be selectable, but it's *not*
> clear to see why it should be *tristate*.  what is the value of its
> tristate-ness?  thanks.

Did you test building with CONFIG_IKCONFIG=m ?
How did you evaluate that it (tristate) is unnecessary?

---
~Randy
PS:  IKCONFIG was originally a bool.  Someone from Google
thought it would be interesting to make it a loadable module.
I disagreed, but the patch was merged anyway.
PPS:  Sorry about the delayed reply.
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux