mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-22 23:13:01 +02:00
Kconfig simplifies expressions, but redundant '&&' and '||' operators
involving constant symbols 'y' and 'n' are sometimes trimmed and
sometimes not.
[Test Code]
config DEP
def_bool y
config A
bool "A"
depends on DEP && y
config B
bool "B"
depends on DEP && y && y
[Result]
$ make helpnewconfig
[ snip ]
-----
There is no help available for this option.
Symbol: A [=n]
Type : bool
Defined at Kconfig:4
Prompt: A
Depends on: DEP [=y] && y [=y]
Location:
-> A (A [=n])
-----
-----
There is no help available for this option.
Symbol: B [=n]
Type : bool
Defined at Kconfig:8
Prompt: B
Depends on: DEP [=y]
Location:
-> B (B [=n])
-----
The dependency for A, 'DEP && y', remains as-is, while that for B,
'DEP && y && y', has been reduced to 'DEP'.
Currently, expr_eliminate_dups() calls expr_eliminate_yn() only when
trans_count != 0, in other words, only when expr_eliminate_dups1() has
trimmed at least one leaf. It fails to trim a single '&& y', etc.
To fix this inconsistent behavior, expr_eliminate_yn() should be called
at least once even if no leaf has been trimmed.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
|
||
|---|---|---|
| .. | ||
| lxdialog | ||
| tests | ||
| .gitignore | ||
| array_size.h | ||
| conf.c | ||
| confdata.c | ||
| expr.c | ||
| expr.h | ||
| gconf-cfg.sh | ||
| gconf.c | ||
| gconf.glade | ||
| hashtable.h | ||
| images.c | ||
| images.h | ||
| internal.h | ||
| lexer.l | ||
| list_types.h | ||
| list.h | ||
| lkc_proto.h | ||
| lkc.h | ||
| Makefile | ||
| mconf-cfg.sh | ||
| mconf.c | ||
| menu.c | ||
| merge_config.sh | ||
| mnconf-common.c | ||
| mnconf-common.h | ||
| nconf-cfg.sh | ||
| nconf.c | ||
| nconf.gui.c | ||
| nconf.h | ||
| parser.y | ||
| preprocess.c | ||
| preprocess.h | ||
| qconf-cfg.sh | ||
| qconf.cc | ||
| qconf.h | ||
| streamline_config.pl | ||
| symbol.c | ||
| util.c | ||