summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-05-27 07:27:09 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-27 07:27:09 +0200
commitf429d35588847fa1048f9dbdcc3cc1ee1b530041 (patch)
tree9c54202c7beb91fa3b76b4f18dc759c570ff1ef9 /scripts
parentMerge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek... (diff)
parentkconfig/symbol.c: handle choice_values that depend on 'm' symbols (diff)
downloadlinux-f429d35588847fa1048f9dbdcc3cc1ee1b530041.tar.xz
linux-f429d35588847fa1048f9dbdcc3cc1ee1b530041.zip
Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kconfig update from Michal Marek: - fix for behavior of tristate choice items and fix for documentation of existing kconfig behavior [Dirk Gouders] - more helpful "unexpected data" kconfig warning [Paul Bolle] * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kconfig/symbol.c: handle choice_values that depend on 'm' symbols kconfig-language: elaborate on the type of a choice kconfig-language: fix comment on dependency-generated menu structures. kconfig: add unexpected data itself to warning
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/confdata.c4
-rw-r--r--scripts/kconfig/symbol.c14
2 files changed, 17 insertions, 1 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index dd243d2abd87..297b079ae4d9 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -375,7 +375,9 @@ load:
continue;
} else {
if (line[0] != '\r' && line[0] != '\n')
- conf_warning("unexpected data");
+ conf_warning("unexpected data: %.*s",
+ (int)strcspn(line, "\r\n"), line);
+
continue;
}
setsym:
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index 25cf0c2c0c79..2432298487fb 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -209,12 +209,26 @@ static void sym_set_all_changed(void)
static void sym_calc_visibility(struct symbol *sym)
{
struct property *prop;
+ struct symbol *choice_sym = NULL;
tristate tri;
/* any prompt visible? */
tri = no;
+
+ if (sym_is_choice_value(sym))
+ choice_sym = prop_get_symbol(sym_get_choice_prop(sym));
+
for_all_prompts(sym, prop) {
prop->visible.tri = expr_calc_value(prop->visible.expr);
+ /*
+ * Tristate choice_values with visibility 'mod' are
+ * not visible if the corresponding choice's value is
+ * 'yes'.
+ */
+ if (choice_sym && sym->type == S_TRISTATE &&
+ prop->visible.tri == mod && choice_sym->curr.tri == yes)
+ prop->visible.tri = no;
+
tri = EXPR_OR(tri, prop->visible.tri);
}
if (tri == mod && (sym->type != S_TRISTATE || modules_val == no))