diff mbox series

[resend,v2] Kconfig: remove sym_set_choice_value

Message ID 20220914015906.3943200-1-zengheng4@huawei.com (mailing list archive)
State New, archived
Headers show
Series [resend,v2] Kconfig: remove sym_set_choice_value | expand

Commit Message

Zeng Heng Sept. 14, 2022, 1:59 a.m. UTC
Following Masahiro's suggestion,
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>
---
 scripts/kconfig/conf.c | 2 +-
 scripts/kconfig/lkc.h  | 5 -----
 2 files changed, 1 insertion(+), 6 deletions(-)

Comments

Masahiro Yamada Sept. 15, 2022, 3:59 a.m. UTC | #1
On Wed, Sep 14, 2022 at 10:52 AM Zeng Heng <zengheng4@huawei.com> wrote:
>
> Following Masahiro's suggestion,
> 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>



Applied to linux-kbuild.
Thanks.


> ---
>  scripts/kconfig/conf.c | 2 +-
>  scripts/kconfig/lkc.h  | 5 -----
>  2 files changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
> index 4178065ca27f..33d19e419908 100644
> --- a/scripts/kconfig/conf.c
> +++ b/scripts/kconfig/conf.c
> @@ -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);
> diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
> index fa8c010aa683..903738a9233a 100644
> --- a/scripts/kconfig/lkc.h
> +++ b/scripts/kconfig/lkc.h
> @@ -124,11 +124,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;
> --
> 2.25.1
>
diff mbox series

Patch

diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 4178065ca27f..33d19e419908 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -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);
diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
index fa8c010aa683..903738a9233a 100644
--- a/scripts/kconfig/lkc.h
+++ b/scripts/kconfig/lkc.h
@@ -124,11 +124,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;