From: Nicolas Pitre <nico@fluxnic.net>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
Richard Cochran <richardcochran@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
John Stultz <john.stultz@linaro.org>,
Josh Triplett <josh@joshtriplett.org>,
Mark Brown <broonie@kernel.org>,
Ulf Magnusson <ulfalizer@gmail.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Jonathan Corbet <corbet@lwn.net>,
Michal Marek <michal.lkml@markovi.net>,
"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kconfig: make 'imply' obey the direct dependency
Date: Thu, 20 Feb 2020 11:21:37 -0500 (EST) [thread overview]
Message-ID: <nycvar.YSQ.7.76.2002201117050.1559@knanqh.ubzr> (raw)
In-Reply-To: <CAK7LNASubs2oJ8-a-amsEhWjYrfpAx8QxeTzH4PnKsELKyLaUw@mail.gmail.com>
On Thu, 20 Feb 2020, Masahiro Yamada wrote:
> Hi Nicolas,
>
> On Thu, Feb 20, 2020 at 1:16 AM Nicolas Pitre <nico@fluxnic.net> wrote:
> >
> > On Wed, 19 Feb 2020, Masahiro Yamada wrote:
> >
> > > As for the combination of FOO=y and BAR=m, the case of BAZ=m is excluded
> > > by the 'imply', and BAZ=y is also excluded by 'depends on'. So, only the
> > > possible value is BAZ=n.
> >
> > I don't think this is right. The imply keyword provide influence over
> > another symbol but it should not impose any restrictions. If BAR=m then
> > BAZ should still be allowed to be m or n.
> >
> > > @@ -174,6 +174,9 @@ applicable everywhere (see syntax).
> > > n y n N/m/y
> > > m y m M/y/n
> > > y y y Y/n
> > > + n m n N/m
> > > + m m m M/n
> > > + y m n N
> >
> > Here the last line shoule be y m n N/m.
> >
> > Generally speaking, the code enabled by FOO may rely on functionalities
> > provided by BAZ only when BAZ >= FOO. This is accomplished with
> > IS_REACHABLE():
> >
> > foo_init()
> > {
> > if (IS_REACHABLE(CONFIG_BAZ))
> > baz_register(&foo);
> > ...
> > }
> >
> > So if FOO=y and BAZ=m then IS_REACHABLE(CONFIG_BAZ) will be false. Maybe
> > adding a note to that effect linked to the "y m n N/m" line in the table
> > would be a good idea.
> >
>
> I also thought so.
>
> I agree IS_REACHABLE() is much saner approach.
>
> So, do you agree to change the current behavior
> as follows?
>
>
> index d0111dd26410..47dbfd1ee003 100644
> --- a/Documentation/kbuild/kconfig-language.rst
> +++ b/Documentation/kbuild/kconfig-language.rst
> @@ -173,7 +173,7 @@ applicable everywhere (see syntax).
> === === ============= ==============
> n y n N/m/y
> m y m M/y/n
> - y y y Y/n
> + y y y Y/m/n
> y n * N
> === === ============= ==============
>
Yes. That should have been the case all along.
Nicolas
prev parent reply other threads:[~2020-02-20 16:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-19 7:49 [PATCH] kconfig: make 'imply' obey the direct dependency Masahiro Yamada
2020-02-19 8:42 ` Geert Uytterhoeven
2020-02-19 9:23 ` Masahiro Yamada
2020-02-19 9:54 ` Geert Uytterhoeven
2020-03-02 8:21 ` Masahiro Yamada
2020-03-02 13:21 ` Mark Brown
2020-02-19 16:15 ` Nicolas Pitre
2020-02-20 7:45 ` Masahiro Yamada
2020-02-20 16:21 ` Nicolas Pitre [this message]
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=nycvar.YSQ.7.76.2002201117050.1559@knanqh.ubzr \
--to=nico@fluxnic.net \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=corbet@lwn.net \
--cc=geert@linux-m68k.org \
--cc=john.stultz@linaro.org \
--cc=josh@joshtriplett.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=michal.lkml@markovi.net \
--cc=richardcochran@gmail.com \
--cc=tglx@linutronix.de \
--cc=ulfalizer@gmail.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;
as well as URLs for NNTP newsgroup(s).