Skip to content

Commit

Permalink
Kconfig: remove sym_set_choice_value
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Zeng Heng authored and Masahiro Yamada committed Sep 28, 2022
1 parent f3304ec commit efc8338
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion scripts/kconfig/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 0 additions & 5 deletions scripts/kconfig/lkc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit efc8338

Please sign in to comment.