Re: [PATCH 3/3] kconfig: remove wrong expr_trans_bool()
From: Masahiro Yamada
Date: Mon Jun 03 2024 - 22:09:21 EST
On Tue, Jun 4, 2024 at 1:19 AM Masahiro Yamada <masahiroy@xxxxxxxxxx> wrote:
>
> expr_trans_bool() performs an incorrect transformation.
>
> [Test Code]
>
> config MODULES
> def_bool y
> modules
>
> config A
> def_bool y
> select C if B != n
>
> config B
> def_tristate m
>
> config C
> tristate
>
> [Result]
>
> CONFIG_MODULES=y
> CONFIG_A=y
> CONFIG_B=m
> CONFIG_C=m
>
> This result is incorrect because CONFIG_C=y is expected.
>
> Documentation/kbuild/kconfig-language.rst clearly explains the function
> of the '!=' operator:
>
> (3) If the values of both symbols are equal, it returns 'n',
> otherwise 'y'.
>
> Therefore, the statement:
>
> select C if A != n
This is wrong.
I meant this:
select C if B != n
--
Best Regards
Masahiro Yamada