Merge tag 'kbuild-fixes-v6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 8 Jun 2024 17:12:33 +0000 (10:12 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 8 Jun 2024 17:12:33 +0000 (10:12 -0700)
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

Documentation/kbuild/kconfig-language.rst
scripts/kconfig/confdata.c
scripts/kconfig/expr.c
scripts/kconfig/expr.h
scripts/kconfig/gconf.c
scripts/kconfig/menu.c
scripts/link-vmlinux.sh
scripts/mod/modpost.c

index 555c2f8399697cdd0351a0d813a156915031c659..1fb3f5e6193c33313980b3d504f7c53899f0fce1 100644 (file)
@@ -150,6 +150,12 @@ applicable everywhere (see syntax).
        That will limit the usefulness but on the other hand avoid
        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>]
 
   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
   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()::
 
        foo_init()
@@ -202,6 +208,10 @@ applicable everywhere (see syntax).
        imply BAR
        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>
 
   This attribute is only applicable to menu blocks, if the condition is
index 387503daf0f73cecadd8eb3ebe6c14f35a55a390..85b53069ba7a40d992b35e6f109e9c3ca2bb8012 100644 (file)
@@ -533,19 +533,6 @@ int conf_read(const char *name)
                         */
                        if (sym->visible == no && !conf_unsaved)
                                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;
-                       }
                }
        }
 
index 4d95fce5f9a7ab7c421c2829c59305738e66a010..fcc190b67b6f6529087eca45d3f8338ac5fba86c 100644 (file)
@@ -396,35 +396,6 @@ static struct expr *expr_eliminate_yn(struct expr *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 -> ?
  */
index fa50fc45622e38e717901e71c54532432c7f1c0c..7c0c242318bcdc081492321238e3511de5cc33fa 100644 (file)
@@ -284,7 +284,6 @@ void expr_free(struct expr *e);
 void expr_eliminate_eq(struct expr **ep1, struct expr **ep2);
 int expr_eq(struct expr *e1, struct expr *e2);
 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_transform(struct expr *e);
 int expr_contains_symbol(struct expr *dep, struct symbol *sym);
index cc400ffe66150be39f5b7acdc6826b930cd85fe4..e04dbafd3add9a893b84004b0a185df961f98ffe 100644 (file)
@@ -1422,7 +1422,6 @@ int main(int ac, char *av[])
 
        conf_parse(name);
        fixup_rootmenu(&rootmenu);
-       conf_read(NULL);
 
        /* Load the interface and connect signals */
        init_main_window(glade_file);
@@ -1430,6 +1429,8 @@ int main(int ac, char *av[])
        init_left_tree();
        init_right_tree();
 
+       conf_read(NULL);
+
        switch (view_mode) {
        case SINGLE_VIEW:
                display_tree_part();
index 53151c5a60281bb5788966f3bc3236607ab4ab64..eef9b63cdf115644ca2e439d15d69197d53f479a 100644 (file)
@@ -398,8 +398,6 @@ static void _menu_finalize(struct menu *parent, bool inside_choice)
                                dep = expr_transform(dep);
                                dep = expr_alloc_and(expr_copy(basedep), dep);
                                dep = expr_eliminate_dups(dep);
-                               if (menu->sym && menu->sym->type != S_TRISTATE)
-                                       dep = expr_trans_bool(dep);
                                prop->visible.expr = dep;
 
                                /*
index 46ce5d04dbeb100ddbe524baa36ccd63415e8738..518c70b8db5078715be6f142f6103a714b6d3063 100755 (executable)
@@ -193,7 +193,7 @@ kallsyms_step()
 mksysmap()
 {
        info NM ${2}
-       ${NM} -n "${1}" | "${srctree}/scripts/mksysmap" > "${2}"
+       ${NM} -n "${1}" | sed -f "${srctree}/scripts/mksysmap" > "${2}"
 }
 
 sorttable()
index 937294ff164fc8fc1ac3c1ed926ec5d1131a43ef..f48d72d22dc2a627994ede651994929ba23c5d97 100644 (file)
@@ -1647,10 +1647,11 @@ static void read_symbols(const char *modname)
                        namespace = get_next_modinfo(&info, "import_ns",
                                                     namespace);
                }
+
+               if (extra_warn && !get_modinfo(&info, "description"))
+                       warn("missing MODULE_DESCRIPTION() in %s\n", modname);
        }
 
-       if (extra_warn && !get_modinfo(&info, "description"))
-               warn("missing MODULE_DESCRIPTION() in %s\n", modname);
        for (sym = info.symtab_start; sym < info.symtab_stop; sym++) {
                symname = remove_dot(info.strtab + sym->st_name);