From: Zeng Heng <zengheng4@huawei.com>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
<liwei391@huawei.com>, "weiyongjun (A)" <weiyongjun1@huawei.com>
Subject: Re: [PATCH -next 1/2] Kconfig: remove unused argment 'ch'
Date: Wed, 14 Sep 2022 09:34:55 +0800 [thread overview]
Message-ID: <7897d2c5-eb48-006f-5e7a-bf78e258dfc5@huawei.com> (raw)
In-Reply-To: <CAK7LNASrH740T45VvbOZyfxF3C8aqMesbMBkEyBsv78Sz4D1AQ@mail.gmail.com>
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 <zengheng4@huawei.com> wrote:
>> Remove unused argment 'ch' in sym_set_choice_value
>>
>> Signed-off-by: Zeng Heng <zengheng4@huawei.com>
>
> 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
>>
>
next prev parent reply other threads:[~2022-09-14 1:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-12 9:48 [PATCH -next 0/2] Kconfig: clean code Zeng Heng
2022-09-12 9:48 ` [PATCH -next 1/2] Kconfig: remove unused argment 'ch' Zeng Heng
2022-09-13 16:35 ` Masahiro Yamada
2022-09-14 1:34 ` Zeng Heng [this message]
2022-09-12 9:48 ` [PATCH -next 2/2] Kconfig: remove unused function 'menu_get_root_menu' Zeng Heng
2022-09-13 16:37 ` Masahiro Yamada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7897d2c5-eb48-006f-5e7a-bf78e258dfc5@huawei.com \
--to=zengheng4@huawei.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liwei391@huawei.com \
--cc=masahiroy@kernel.org \
--cc=weiyongjun1@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox