diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/kconfig/symbol.c | 34 | ||||
-rwxr-xr-x | scripts/kernel-doc | 6 | ||||
-rw-r--r-- | scripts/mod/modpost.c | 2 |
3 files changed, 25 insertions, 17 deletions
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c index 3929e5b35e79..4a03191ad176 100644 --- a/scripts/kconfig/symbol.c +++ b/scripts/kconfig/symbol.c | |||
@@ -298,22 +298,30 @@ void sym_calc_value(struct symbol *sym) | |||
298 | if (sym_is_choice_value(sym) && sym->visible == yes) { | 298 | if (sym_is_choice_value(sym) && sym->visible == yes) { |
299 | prop = sym_get_choice_prop(sym); | 299 | prop = sym_get_choice_prop(sym); |
300 | newval.tri = (prop_get_symbol(prop)->curr.val == sym) ? yes : no; | 300 | newval.tri = (prop_get_symbol(prop)->curr.val == sym) ? yes : no; |
301 | } else if (EXPR_OR(sym->visible, sym->rev_dep.tri) != no) { | 301 | } else { |
302 | sym->flags |= SYMBOL_WRITE; | 302 | if (sym->visible != no) { |
303 | if (sym_has_value(sym)) | 303 | /* if the symbol is visible use the user value |
304 | newval.tri = sym->def[S_DEF_USER].tri; | 304 | * if available, otherwise try the default value |
305 | else if (!sym_is_choice(sym)) { | 305 | */ |
306 | prop = sym_get_default_prop(sym); | 306 | sym->flags |= SYMBOL_WRITE; |
307 | if (prop) | 307 | if (sym_has_value(sym)) { |
308 | newval.tri = expr_calc_value(prop->expr); | 308 | newval.tri = EXPR_AND(sym->def[S_DEF_USER].tri, |
309 | sym->visible); | ||
310 | goto calc_newval; | ||
311 | } | ||
309 | } | 312 | } |
310 | newval.tri = EXPR_OR(EXPR_AND(newval.tri, sym->visible), sym->rev_dep.tri); | 313 | if (sym->rev_dep.tri != no) |
311 | } else if (!sym_is_choice(sym)) { | ||
312 | prop = sym_get_default_prop(sym); | ||
313 | if (prop) { | ||
314 | sym->flags |= SYMBOL_WRITE; | 314 | sym->flags |= SYMBOL_WRITE; |
315 | newval.tri = expr_calc_value(prop->expr); | 315 | if (!sym_is_choice(sym)) { |
316 | prop = sym_get_default_prop(sym); | ||
317 | if (prop) { | ||
318 | sym->flags |= SYMBOL_WRITE; | ||
319 | newval.tri = EXPR_AND(expr_calc_value(prop->expr), | ||
320 | prop->visible.tri); | ||
321 | } | ||
316 | } | 322 | } |
323 | calc_newval: | ||
324 | newval.tri = EXPR_OR(newval.tri, sym->rev_dep.tri); | ||
317 | } | 325 | } |
318 | if (newval.tri == mod && sym_get_type(sym) == S_BOOLEAN) | 326 | if (newval.tri == mod && sym_get_type(sym) == S_BOOLEAN) |
319 | newval.tri = yes; | 327 | newval.tri = yes; |
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 26146cbaa504..74c2f9db2aac 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
@@ -1512,13 +1512,13 @@ sub create_parameterlist($$$) { | |||
1512 | # corresponding data structures "correctly". Catch it later in | 1512 | # corresponding data structures "correctly". Catch it later in |
1513 | # output_* subs. | 1513 | # output_* subs. |
1514 | push_parameter($arg, "", $file); | 1514 | push_parameter($arg, "", $file); |
1515 | } elsif ($arg =~ m/\(.*\*/) { | 1515 | } elsif ($arg =~ m/\(.+\)\s*\(/) { |
1516 | # pointer-to-function | 1516 | # pointer-to-function |
1517 | $arg =~ tr/#/,/; | 1517 | $arg =~ tr/#/,/; |
1518 | $arg =~ m/[^\(]+\(\*\s*([^\)]+)\)/; | 1518 | $arg =~ m/[^\(]+\(\*?\s*(\w*)\s*\)/; |
1519 | $param = $1; | 1519 | $param = $1; |
1520 | $type = $arg; | 1520 | $type = $arg; |
1521 | $type =~ s/([^\(]+\(\*)$param/$1/; | 1521 | $type =~ s/([^\(]+\(\*?)\s*$param/$1/; |
1522 | push_parameter($param, $type, $file); | 1522 | push_parameter($param, $type, $file); |
1523 | } elsif ($arg) { | 1523 | } elsif ($arg) { |
1524 | $arg =~ s/\s*:\s*/:/g; | 1524 | $arg =~ s/\s*:\s*/:/g; |
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 61742771c65d..695b5d657cf5 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
@@ -1200,7 +1200,7 @@ static void report_sec_mismatch(const char *modname, enum mismatch mismatch, | |||
1200 | "annotate %s with a matching annotation.\n", | 1200 | "annotate %s with a matching annotation.\n", |
1201 | from, sec2annotation(fromsec), fromsym, from_p, | 1201 | from, sec2annotation(fromsec), fromsym, from_p, |
1202 | to, sec2annotation(tosec), tosym, to_p, | 1202 | to, sec2annotation(tosec), tosym, to_p, |
1203 | fromsym, tosym, fromsym); | 1203 | tosym, fromsym, tosym); |
1204 | break; | 1204 | break; |
1205 | case INIT_TO_EXIT: | 1205 | case INIT_TO_EXIT: |
1206 | fprintf(stderr, | 1206 | fprintf(stderr, |