2022-09-12 10:17:01

by Zeng Heng

[permalink] [raw]
Subject: [PATCH -next 1/2] Kconfig: remove unused argment 'ch'

Remove unused argment 'ch' in sym_set_choice_value

Signed-off-by: Zeng Heng <[email protected]>
---
scripts/kconfig/conf.c | 2 +-
scripts/kconfig/lkc.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 4178065ca27f..635265a18a07 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_choice_value(child->sym);
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..279d56a44136 100644
--- a/scripts/kconfig/lkc.h
+++ b/scripts/kconfig/lkc.h
@@ -124,7 +124,7 @@ 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)
+static inline bool sym_set_choice_value(struct symbol *chval)
{
return sym_set_tristate_value(chval, yes);
}
--
2.25.1


2022-09-13 17:51:40

by Masahiro Yamada

[permalink] [raw]
Subject: Re: [PATCH -next 1/2] Kconfig: remove unused argment 'ch'

On Mon, Sep 12, 2022 at 6:41 PM Zeng Heng <[email protected]> wrote:
>
> Remove unused argment 'ch' in sym_set_choice_value
>
> Signed-off-by: Zeng Heng <[email protected]>


Can you remove sym_set_choice_value() and
call sym_set_tristate_value(chval, yes) directly?





> ---
> scripts/kconfig/conf.c | 2 +-
> scripts/kconfig/lkc.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
> index 4178065ca27f..635265a18a07 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_choice_value(child->sym);
> 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..279d56a44136 100644
> --- a/scripts/kconfig/lkc.h
> +++ b/scripts/kconfig/lkc.h
> @@ -124,7 +124,7 @@ 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)
> +static inline bool sym_set_choice_value(struct symbol *chval)
> {
> return sym_set_tristate_value(chval, yes);
> }
> --
> 2.25.1
>


--
Best Regards
Masahiro Yamada

2022-09-14 01:41:13

by Zeng Heng

[permalink] [raw]
Subject: Re: [PATCH -next 1/2] Kconfig: remove unused argment 'ch'

Yes, I would replace sym_set_choice_value with sym_set_tristate_value at v2.


在 2022/9/14 0:35, Masahiro Yamada 写道:
> On Mon, Sep 12, 2022 at 6:41 PM Zeng Heng <[email protected]> wrote:
>> Remove unused argment 'ch' in sym_set_choice_value
>>
>> Signed-off-by: Zeng Heng <[email protected]>
>
> Can you remove sym_set_choice_value() and
> call sym_set_tristate_value(chval, yes) directly?
>
>
>
>
>
>> ---
>> scripts/kconfig/conf.c | 2 +-
>> scripts/kconfig/lkc.h | 2 +-
>> 2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
>> index 4178065ca27f..635265a18a07 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_choice_value(child->sym);
>> 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..279d56a44136 100644
>> --- a/scripts/kconfig/lkc.h
>> +++ b/scripts/kconfig/lkc.h
>> @@ -124,7 +124,7 @@ 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)
>> +static inline bool sym_set_choice_value(struct symbol *chval)
>> {
>> return sym_set_tristate_value(chval, yes);
>> }
>> --
>> 2.25.1
>>
>