Kbuild fixes for v6.10 (second)

- 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()
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCgAzFiEEbmPs18K1szRHjPqEPYsBB53g2wYFAmZkjoAVHG1hc2FoaXJv
 eUBrZXJuZWwub3JnAAoJED2LAQed4NsGEQgQAI6724AWOTd5pAkTxSGxNdzl12NB
 fzk3Sh/r1448QmzpXUbeGONHVXhwBRipl2oAZVwo/8YgwHOqUlAp/73GYD4ryz6P
 WCMHhVQ++yYSx9H1XvZ1hMM6RZI9hnBxk7KfSu+OYbg49shEq6MpToKBD8N/Fdlm
 HEmJWZXtGvANsxItRMpcZ1zHxYEDKcFmmyTc7vWEK929FLg0WAxj15C0vT+RAGs3
 byLsGsg84g/K3FNIjobXnBhKSV2qDbl0si+1T1DGmAHu2i/6i2bin6qqKt9P+CAa
 DY8GQfP07VdO/HPVUsCC2AxiNIsPycTPwF+1H0UGSNX8J3xguzdtwkNdn4dxenrn
 vV8JWyCyr2oMdhxlV9NmO5e7xWcg6c1gYJas8ilMmqCotV2NddY8EMLA3ta+/73n
 0Qvqiixy4J2K/8bNlHoDkn+Xnm82qcyU2w4qTB7+TUjYx/jsr+gnXYFqQBgjXQF8
 DGiyFhqGv5rd/dWoeKmSAhWjmOwOCXtx3T4s/PTpN+FIC+rMSX6l7lIrMBSiaTfM
 gLnytpUXdfSMUv071cqo/bizelLG44x8M8qv0+b/WaKO9U7YxwqxBMOyTzBwgnRB
 VGdEpROK/8FlKtRpk38AS884kn/1RStzjy868nvmmEZ582jO9FlqFMfK6sxD7uP1
 GOnXYcgDIKqmIROA
 =RzRM
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2024-06-08 10:12:33 -07:00
commit 329f70c5be
8 changed files with 17 additions and 50 deletions

View File

@ -150,6 +150,12 @@ applicable everywhere (see syntax).
That will limit the usefulness but on the other hand avoid That will limit the usefulness but on the other hand avoid
the illegal configurations all over. the illegal configurations all over.
If "select" <symbol> is followed by "if" <expr>, <symbol> will be
selected by the logical AND of the value of the current menu symbol
and <expr>. This means, the lower limit can be downgraded due to the
presence of "if" <expr>. This behavior may seem weird, but we rely on
it. (The future of this behavior is undecided.)
- weak reverse dependencies: "imply" <symbol> ["if" <expr>] - weak reverse dependencies: "imply" <symbol> ["if" <expr>]
This is similar to "select" as it enforces a lower limit on another This is similar to "select" as it enforces a lower limit on another
@ -184,7 +190,7 @@ applicable everywhere (see syntax).
ability to hook into a secondary subsystem while allowing the user to ability to hook into a secondary subsystem while allowing the user to
configure that subsystem out without also having to unset these drivers. configure that subsystem out without also having to unset these drivers.
Note: If the combination of FOO=y and BAR=m causes a link error, Note: If the combination of FOO=y and BAZ=m causes a link error,
you can guard the function call with IS_REACHABLE():: you can guard the function call with IS_REACHABLE()::
foo_init() foo_init()
@ -202,6 +208,10 @@ applicable everywhere (see syntax).
imply BAR imply BAR
imply BAZ imply BAZ
Note: If "imply" <symbol> is followed by "if" <expr>, the default of <symbol>
will be the logical AND of the value of the current menu symbol and <expr>.
(The future of this behavior is undecided.)
- limiting menu display: "visible if" <expr> - limiting menu display: "visible if" <expr>
This attribute is only applicable to menu blocks, if the condition is This attribute is only applicable to menu blocks, if the condition is

View File

@ -533,19 +533,6 @@ int conf_read(const char *name)
*/ */
if (sym->visible == no && !conf_unsaved) if (sym->visible == no && !conf_unsaved)
sym->flags &= ~SYMBOL_DEF_USER; sym->flags &= ~SYMBOL_DEF_USER;
switch (sym->type) {
case S_STRING:
case S_INT:
case S_HEX:
/* Reset a string value if it's out of range */
if (sym_string_within_range(sym, sym->def[S_DEF_USER].val))
break;
sym->flags &= ~SYMBOL_VALID;
conf_unsaved++;
break;
default:
break;
}
} }
} }

View File

@ -396,35 +396,6 @@ static struct expr *expr_eliminate_yn(struct expr *e)
return e; return e;
} }
/*
* bool FOO!=n => FOO
*/
struct expr *expr_trans_bool(struct expr *e)
{
if (!e)
return NULL;
switch (e->type) {
case E_AND:
case E_OR:
case E_NOT:
e->left.expr = expr_trans_bool(e->left.expr);
e->right.expr = expr_trans_bool(e->right.expr);
break;
case E_UNEQUAL:
// FOO!=n -> FOO
if (e->left.sym->type == S_TRISTATE) {
if (e->right.sym == &symbol_no) {
e->type = E_SYMBOL;
e->right.sym = NULL;
}
}
break;
default:
;
}
return e;
}
/* /*
* e1 || e2 -> ? * e1 || e2 -> ?
*/ */

View File

@ -284,7 +284,6 @@ void expr_free(struct expr *e);
void expr_eliminate_eq(struct expr **ep1, struct expr **ep2); void expr_eliminate_eq(struct expr **ep1, struct expr **ep2);
int expr_eq(struct expr *e1, struct expr *e2); int expr_eq(struct expr *e1, struct expr *e2);
tristate expr_calc_value(struct expr *e); tristate expr_calc_value(struct expr *e);
struct expr *expr_trans_bool(struct expr *e);
struct expr *expr_eliminate_dups(struct expr *e); struct expr *expr_eliminate_dups(struct expr *e);
struct expr *expr_transform(struct expr *e); struct expr *expr_transform(struct expr *e);
int expr_contains_symbol(struct expr *dep, struct symbol *sym); int expr_contains_symbol(struct expr *dep, struct symbol *sym);

View File

@ -1422,7 +1422,6 @@ int main(int ac, char *av[])
conf_parse(name); conf_parse(name);
fixup_rootmenu(&rootmenu); fixup_rootmenu(&rootmenu);
conf_read(NULL);
/* Load the interface and connect signals */ /* Load the interface and connect signals */
init_main_window(glade_file); init_main_window(glade_file);
@ -1430,6 +1429,8 @@ int main(int ac, char *av[])
init_left_tree(); init_left_tree();
init_right_tree(); init_right_tree();
conf_read(NULL);
switch (view_mode) { switch (view_mode) {
case SINGLE_VIEW: case SINGLE_VIEW:
display_tree_part(); display_tree_part();

View File

@ -398,8 +398,6 @@ static void _menu_finalize(struct menu *parent, bool inside_choice)
dep = expr_transform(dep); dep = expr_transform(dep);
dep = expr_alloc_and(expr_copy(basedep), dep); dep = expr_alloc_and(expr_copy(basedep), dep);
dep = expr_eliminate_dups(dep); dep = expr_eliminate_dups(dep);
if (menu->sym && menu->sym->type != S_TRISTATE)
dep = expr_trans_bool(dep);
prop->visible.expr = dep; prop->visible.expr = dep;
/* /*

View File

@ -193,7 +193,7 @@ kallsyms_step()
mksysmap() mksysmap()
{ {
info NM ${2} info NM ${2}
${NM} -n "${1}" | "${srctree}/scripts/mksysmap" > "${2}" ${NM} -n "${1}" | sed -f "${srctree}/scripts/mksysmap" > "${2}"
} }
sorttable() sorttable()

View File

@ -1647,10 +1647,11 @@ static void read_symbols(const char *modname)
namespace = get_next_modinfo(&info, "import_ns", namespace = get_next_modinfo(&info, "import_ns",
namespace); namespace);
} }
}
if (extra_warn && !get_modinfo(&info, "description")) if (extra_warn && !get_modinfo(&info, "description"))
warn("missing MODULE_DESCRIPTION() in %s\n", modname); warn("missing MODULE_DESCRIPTION() in %s\n", modname);
}
for (sym = info.symtab_start; sym < info.symtab_stop; sym++) { for (sym = info.symtab_start; sym < info.symtab_stop; sym++) {
symname = remove_dot(info.strtab + sym->st_name); symname = remove_dot(info.strtab + sym->st_name);