Go to file
Masahiro Yamada cb67ab2cd2 kconfig: do not write choice values when their dependency becomes n
"# CONFIG_... is not set" for choice values are wrongly written into
the .config file if they are once visible, then become invisible later.

  Test case
  ---------

---------------------------(Kconfig)----------------------------
config A
	bool "A"

choice
	prompt "Choice ?"
	depends on A

config CHOICE_B
	bool "Choice B"

config CHOICE_C
	bool "Choice C"

endchoice
----------------------------------------------------------------

---------------------------(.config)----------------------------
CONFIG_A=y
----------------------------------------------------------------

With the Kconfig and .config above,

  $ make config
  scripts/kconfig/conf  --oldaskconfig Kconfig
  *
  * Linux Kernel Configuration
  *
  A (A) [Y/n] n
  #
  # configuration written to .config
  #
  $ cat .config
  #
  # Automatically generated file; DO NOT EDIT.
  # Linux Kernel Configuration
  #
  # CONFIG_A is not set
  # CONFIG_CHOICE_B is not set
  # CONFIG_CHOICE_C is not set

Here,

  # CONFIG_CHOICE_B is not set
  # CONFIG_CHOICE_C is not set

should not be written into the .config file because their dependency
"depends on A" is unmet.

Currently, there is no code that clears SYMBOL_WRITE of choice values.

Clear SYMBOL_WRITE for all symbols in sym_calc_value(), then set it
again after calculating visibility.  To simplify the logic, set the
flag if they have non-n visibility, regardless of types, and regardless
of whether they are choice values or not.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Ulf Magnusson <ulfalizer@gmail.com>
2018-02-09 04:08:05 +09:00
Documentation drm/graphics pull request for v4.16-rc1 2018-02-01 17:48:47 -08:00
LICENSES LICENSES: Add MPL-1.1 license 2018-01-06 10:59:44 -07:00
arch nios2: kconfig: Remove blank help text 2018-02-03 00:02:11 +09:00
block
certs
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2018-01-31 14:22:45 -08:00
drivers Staging: rtl8192e: kconfig: Remove blank help text 2018-02-02 23:53:10 +09:00
firmware
fs Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk 2018-02-01 13:36:15 -08:00
include drm/graphics pull request for v4.16-rc1 2018-02-01 17:48:47 -08:00
init
ipc
kernel Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk 2018-02-01 13:36:15 -08:00
lib lib/Kconfig.debug: Remove blank help text 2018-02-02 23:53:10 +09:00
mm mm/swap.c: make functions and their kernel-doc agree 2018-01-31 17:18:40 -08:00
net Staging/IIO patches for 4.16-rc1 2018-02-01 09:51:57 -08:00
samples Driver Core updates for 4.16-rc1 2018-02-01 10:00:28 -08:00
scripts kconfig: do not write choice values when their dependency becomes n 2018-02-09 04:08:05 +09:00
security Char/Misc driver patches for 4.16-rc1 2018-02-01 10:31:17 -08:00
sound Driver Core updates for 4.16-rc1 2018-02-01 10:00:28 -08:00
tools Char/Misc driver patches for 4.16-rc1 2018-02-01 10:31:17 -08:00
usr
virt mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks 2018-01-31 17:18:38 -08:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS drm/graphics pull request for v4.16-rc1 2018-02-01 17:48:47 -08:00
Makefile kbuild: clang: disable unused variable warnings only when constant 2018-02-07 09:20:19 +09:00
README

README

Linux kernel
============

This file was moved to Documentation/admin-guide/README.rst

Please notice that there are several guides for kernel developers and users.
These guides can be rendered in a number of formats, like HTML and PDF.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.