Kconfig: remove sym_set_choice_value
authorZeng Heng <zengheng4@huawei.com>
Wed, 14 Sep 2022 01:59:06 +0000 (09:59 +0800)
committerMasahiro Yamada <masahiroy@kernel.org>
Wed, 28 Sep 2022 19:40:15 +0000 (04:40 +0900)
sym_set_choice_value could be removed and directly call
sym_set_tristate_value instead.

Signed-off-by: Zeng Heng <zengheng4@huawei.com>
Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/kconfig/conf.c
scripts/kconfig/lkc.h

index 4178065..33d19e4 100644 (file)
@@ -551,7 +551,7 @@ static int conf_choice(struct menu *menu)
                        print_help(child);
                        continue;
                }
-               sym_set_choice_value(sym, child->sym);
+               sym_set_tristate_value(child->sym, yes);
                for (child = child->list; child; child = child->next) {
                        indent += 2;
                        conf(child);
index c396aa1..6ac2eab 100644 (file)
@@ -123,11 +123,6 @@ static inline struct symbol *sym_get_choice_value(struct symbol *sym)
        return (struct symbol *)sym->curr.val;
 }
 
-static inline bool sym_set_choice_value(struct symbol *ch, struct symbol *chval)
-{
-       return sym_set_tristate_value(chval, yes);
-}
-
 static inline bool sym_is_choice(struct symbol *sym)
 {
        return sym->flags & SYMBOL_CHOICE ? true : false;