Skip to content

Commit 329f70c

Browse files
committed
Merge tag 'kbuild-fixes-v6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild fixes from Masahiro Yamada: - Fix the initial state of the save button in 'make gconfig' - Improve the Kconfig documentation - Fix a Kconfig bug regarding property visibility - Fix build breakage for systems where 'sed' is not installed in /bin - Fix a false warning about missing MODULE_DESCRIPTION() * tag 'kbuild-fixes-v6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: modpost: do not warn about missing MODULE_DESCRIPTION() for vmlinux.o kbuild: explicitly run mksysmap as sed script from link-vmlinux.sh kconfig: remove wrong expr_trans_bool() kconfig: doc: document behavior of 'select' and 'imply' followed by 'if' kconfig: doc: fix a typo in the note about 'imply' kconfig: gconf: give a proper initial state to the Save button kconfig: remove unneeded code for user-supplied values being out of range
2 parents 1e7ccdd + 9185afe commit 329f70c

File tree

8 files changed

+17
-50
lines changed

8 files changed

+17
-50
lines changed

Documentation/kbuild/kconfig-language.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,12 @@ applicable everywhere (see syntax).
150150
That will limit the usefulness but on the other hand avoid
151151
the illegal configurations all over.
152152

153+
If "select" <symbol> is followed by "if" <expr>, <symbol> will be
154+
selected by the logical AND of the value of the current menu symbol
155+
and <expr>. This means, the lower limit can be downgraded due to the
156+
presence of "if" <expr>. This behavior may seem weird, but we rely on
157+
it. (The future of this behavior is undecided.)
158+
153159
- weak reverse dependencies: "imply" <symbol> ["if" <expr>]
154160

155161
This is similar to "select" as it enforces a lower limit on another
@@ -184,7 +190,7 @@ applicable everywhere (see syntax).
184190
ability to hook into a secondary subsystem while allowing the user to
185191
configure that subsystem out without also having to unset these drivers.
186192

187-
Note: If the combination of FOO=y and BAR=m causes a link error,
193+
Note: If the combination of FOO=y and BAZ=m causes a link error,
188194
you can guard the function call with IS_REACHABLE()::
189195

190196
foo_init()
@@ -202,6 +208,10 @@ applicable everywhere (see syntax).
202208
imply BAR
203209
imply BAZ
204210

211+
Note: If "imply" <symbol> is followed by "if" <expr>, the default of <symbol>
212+
will be the logical AND of the value of the current menu symbol and <expr>.
213+
(The future of this behavior is undecided.)
214+
205215
- limiting menu display: "visible if" <expr>
206216

207217
This attribute is only applicable to menu blocks, if the condition is

scripts/kconfig/confdata.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -533,19 +533,6 @@ int conf_read(const char *name)
533533
*/
534534
if (sym->visible == no && !conf_unsaved)
535535
sym->flags &= ~SYMBOL_DEF_USER;
536-
switch (sym->type) {
537-
case S_STRING:
538-
case S_INT:
539-
case S_HEX:
540-
/* Reset a string value if it's out of range */
541-
if (sym_string_within_range(sym, sym->def[S_DEF_USER].val))
542-
break;
543-
sym->flags &= ~SYMBOL_VALID;
544-
conf_unsaved++;
545-
break;
546-
default:
547-
break;
548-
}
549536
}
550537
}
551538

scripts/kconfig/expr.c

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -396,35 +396,6 @@ static struct expr *expr_eliminate_yn(struct expr *e)
396396
return e;
397397
}
398398

399-
/*
400-
* bool FOO!=n => FOO
401-
*/
402-
struct expr *expr_trans_bool(struct expr *e)
403-
{
404-
if (!e)
405-
return NULL;
406-
switch (e->type) {
407-
case E_AND:
408-
case E_OR:
409-
case E_NOT:
410-
e->left.expr = expr_trans_bool(e->left.expr);
411-
e->right.expr = expr_trans_bool(e->right.expr);
412-
break;
413-
case E_UNEQUAL:
414-
// FOO!=n -> FOO
415-
if (e->left.sym->type == S_TRISTATE) {
416-
if (e->right.sym == &symbol_no) {
417-
e->type = E_SYMBOL;
418-
e->right.sym = NULL;
419-
}
420-
}
421-
break;
422-
default:
423-
;
424-
}
425-
return e;
426-
}
427-
428399
/*
429400
* e1 || e2 -> ?
430401
*/

scripts/kconfig/expr.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ void expr_free(struct expr *e);
284284
void expr_eliminate_eq(struct expr **ep1, struct expr **ep2);
285285
int expr_eq(struct expr *e1, struct expr *e2);
286286
tristate expr_calc_value(struct expr *e);
287-
struct expr *expr_trans_bool(struct expr *e);
288287
struct expr *expr_eliminate_dups(struct expr *e);
289288
struct expr *expr_transform(struct expr *e);
290289
int expr_contains_symbol(struct expr *dep, struct symbol *sym);

scripts/kconfig/gconf.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1422,14 +1422,15 @@ int main(int ac, char *av[])
14221422

14231423
conf_parse(name);
14241424
fixup_rootmenu(&rootmenu);
1425-
conf_read(NULL);
14261425

14271426
/* Load the interface and connect signals */
14281427
init_main_window(glade_file);
14291428
init_tree_model();
14301429
init_left_tree();
14311430
init_right_tree();
14321431

1432+
conf_read(NULL);
1433+
14331434
switch (view_mode) {
14341435
case SINGLE_VIEW:
14351436
display_tree_part();

scripts/kconfig/menu.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,6 @@ static void _menu_finalize(struct menu *parent, bool inside_choice)
398398
dep = expr_transform(dep);
399399
dep = expr_alloc_and(expr_copy(basedep), dep);
400400
dep = expr_eliminate_dups(dep);
401-
if (menu->sym && menu->sym->type != S_TRISTATE)
402-
dep = expr_trans_bool(dep);
403401
prop->visible.expr = dep;
404402

405403
/*

scripts/link-vmlinux.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ kallsyms_step()
193193
mksysmap()
194194
{
195195
info NM ${2}
196-
${NM} -n "${1}" | "${srctree}/scripts/mksysmap" > "${2}"
196+
${NM} -n "${1}" | sed -f "${srctree}/scripts/mksysmap" > "${2}"
197197
}
198198

199199
sorttable()

scripts/mod/modpost.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,10 +1647,11 @@ static void read_symbols(const char *modname)
16471647
namespace = get_next_modinfo(&info, "import_ns",
16481648
namespace);
16491649
}
1650+
1651+
if (extra_warn && !get_modinfo(&info, "description"))
1652+
warn("missing MODULE_DESCRIPTION() in %s\n", modname);
16501653
}
16511654

1652-
if (extra_warn && !get_modinfo(&info, "description"))
1653-
warn("missing MODULE_DESCRIPTION() in %s\n", modname);
16541655
for (sym = info.symtab_start; sym < info.symtab_stop; sym++) {
16551656
symname = remove_dot(info.strtab + sym->st_name);
16561657

0 commit comments

Comments
 (0)