diff options
author | Arnaud Lacombe <lacombar@gmail.com> | 2010-09-26 22:24:08 +0200 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-12-21 17:59:14 +0100 |
commit | 1137c56b7420c801147e0863845c03b07554721a (patch) | |
tree | 73f1decaebc5a2825e04b30569b0a97595397360 /scripts/kconfig/symbol.c | |
parent | kconfig: add more S_INT and S_HEX consistency checks (diff) | |
download | linux-1137c56b7420c801147e0863845c03b07554721a.tar.xz linux-1137c56b7420c801147e0863845c03b07554721a.zip |
kconfig: simplify select-with-unmet-direct-dependency warning
This is an attempt to simplify the expressing printed by kconfig when a
symbol is selected but still has direct unmet dependency.
First, the symbol reverse dependency is split in sub-expression. Then,
each sub-expression is checked to ensure that it does not contains the
unmet dependency. This removes the false-positive symbols and fixed symbol
which already have the correct dependency. Finally, only the symbol
responsible of the "select" is printed, instead of its full dependency tree.
CC: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/kconfig/symbol.c')
-rw-r--r-- | scripts/kconfig/symbol.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c index 60830ce4a0a9..fa52e6f44ac4 100644 --- a/scripts/kconfig/symbol.c +++ b/scripts/kconfig/symbol.c @@ -351,12 +351,16 @@ void sym_calc_value(struct symbol *sym) } calc_newval: if (sym->dir_dep.tri == no && sym->rev_dep.tri != no) { + struct expr *e; + e = expr_simplify_unmet_dep(sym->rev_dep.expr, + sym->dir_dep.expr); fprintf(stderr, "warning: ("); - expr_fprint(sym->rev_dep.expr, stderr); + expr_fprint(e, stderr); fprintf(stderr, ") selects %s which has unmet direct dependencies (", sym->name); expr_fprint(sym->dir_dep.expr, stderr); fprintf(stderr, ")\n"); + expr_free(e); } newval.tri = EXPR_OR(newval.tri, sym->rev_dep.tri); } |