Commit f80bffeb authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Wentao Guan
Browse files

kconfig: remove unused code for S_DEF_AUTO in conf_read_simple()

stable inclusion
from stable-v6.6.76
commit 94d9ee3b85d204ceeb0e7ca1221d1316888328f1
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IBW08Q

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=94d9ee3b85d204ceeb0e7ca1221d1316888328f1



--------------------------------

[ 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: default avatarMasahiro Yamada <masahiroy@kernel.org>
Stable-dep-of: a409fc1463d6 ("kconfig: fix memory leak in sym_warn_unmet_dep()")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
(cherry picked from commit 94d9ee3b85d204ceeb0e7ca1221d1316888328f1)
Signed-off-by: default avatarWentao Guan <guanwentao@uniontech.com>
parent 005da237
Loading
Loading
Loading
Loading
+8 −13
Original line number Diff line number Diff line
@@ -442,7 +442,7 @@ int conf_read_simple(const char *name, int def)
			*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)
@@ -452,11 +452,6 @@ int conf_read_simple(const char *name, int def)
				conf_set_changed(true);
				continue;
			}
			} else {
				sym = sym_lookup(line + 2 + strlen(CONFIG_), 0);
				if (sym->type == S_UNKNOWN)
					sym->type = S_BOOLEAN;
			}
			if (sym->flags & def_flags) {
				conf_warning("override: reassigning to symbol %s", sym->name);
			}