]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
kconfig: remove unneeded code for user-supplied values being out of range
authorMasahiro Yamada <masahiroy@kernel.org>
Sat, 1 Jun 2024 18:20:38 +0000 (03:20 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Thu, 6 Jun 2024 11:03:14 +0000 (20:03 +0900)
This is a leftover from commit ce1fc9345a59 ("kconfig: do not clear
SYMBOL_DEF_USER when the value is out of range").

This code is now redundant because if a user-supplied value is out
of range, the value adjusted by sym_validate_range() differs, and
conf_unsaved has already been incremented a few lines above.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/kconfig/confdata.c

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;
-                       }
                }
        }