]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
kconfig: remove unused code for S_DEF_AUTO in conf_read_simple()
authorMasahiro Yamada <masahiroy@kernel.org>
Sat, 18 Nov 2023 07:59:08 +0000 (16:59 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:50:14 +0000 (12:50 +0100)
[ Upstream commit 92d4fe0a48f1ab6cf20143dd0b376f4fe842854b ]

The 'else' arm here is unreachable in practical use cases.

include/config/auto.conf does not include "# CONFIG_... is not set"
line unless it is manually hacked.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Stable-dep-of: a409fc1463d6 ("kconfig: fix memory leak in sym_warn_unmet_dep()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
scripts/kconfig/confdata.c

index 80160aee01ff62f40e284328940cf6c4e3de0d50..8349f6ecd9dc73d0d6901c4d44b7d357b4283d3c 100644 (file)
@@ -444,20 +444,15 @@ load:
                        *p++ = 0;
                        if (strncmp(p, "is not set", 10))
                                continue;
-                       if (def == S_DEF_USER) {
-                               sym = sym_find(line + 2 + strlen(CONFIG_));
-                               if (!sym) {
-                                       if (warn_unknown)
-                                               conf_warning("unknown symbol: %s",
-                                                            line + 2 + strlen(CONFIG_));
 
-                                       conf_set_changed(true);
-                                       continue;
-                               }
-                       } else {
-                               sym = sym_lookup(line + 2 + strlen(CONFIG_), 0);
-                               if (sym->type == S_UNKNOWN)
-                                       sym->type = S_BOOLEAN;
+                       sym = sym_find(line + 2 + strlen(CONFIG_));
+                       if (!sym) {
+                               if (warn_unknown)
+                                       conf_warning("unknown symbol: %s",
+                                                    line + 2 + strlen(CONFIG_));
+
+                               conf_set_changed(true);
+                               continue;
                        }
                        if (sym->flags & def_flags) {
                                conf_warning("override: reassigning to symbol %s", sym->name);