From: "Arnd Bergmann" <arnd@arndb.de>
To: "Julian Braha" <julianbraha@gmail.com>,
"Graham Roff" <grahamr@qti.qualcomm.com>,
"Nathan Chancellor" <nathan@kernel.org>,
"Nicolas Schier" <nsc@kernel.org>,
"Jonathan Corbet" <corbet@lwn.net>
Cc: linux-kbuild@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, "Nicolas Pitre" <nico@fluxnic.net>,
"Jani Nikula" <jani.nikula@linux.intel.com>,
"Masahiro Yamada" <masahiroy@kernel.org>
Subject: Re: [PATCH v3] kconfig: Support conditional deps using "depends on X if Y"
Date: Sat, 04 Jul 2026 17:33:16 +0200 [thread overview]
Message-ID: <7e20408b-3a0d-46ff-ab6c-2b0d86f74adc@app.fastmail.com> (raw)
In-Reply-To: <955bf67f-309d-45d4-ac0d-2f53577aa18e@gmail.com>
On Sat, Jul 4, 2026, at 15:23, Julian Braha wrote:
> On 12/15/25 23:06, Graham Roff wrote:
>> Previously such optional dependencies had to be expressed as
>> the counterintuitive "depends on X || !X", now this can be
>> represented as "depends on X if X".
>
> I have always found both of these:
> 'depends on X || !X'
> and:
> 'depends on X if X'
>
> to be unintuitive and confusing to read.
>
> Yes, I understand from the docs that the purpose is to disallow
> FOO=Y with BAR=M, like in this example from the official kconfig docs:
> ```
> config FOO
> tristate "Support for foo hardware"
> depends on BAR if BAR
> ```
>
> However, in my testing, neither of these constructs are necessary to
> achieve that.
>
> A very standard 'depends on BAR' also disallows FOO=Y with BAR=M.
The difference is that a plain 'depends on BAR' does not
allow FOO=m with BAR=n. The idea of the construct is that
BAR is optional, but whenever BAR is enabled (m or y) it is
a dependency.
Specifically we need to allow all of
BAR=n FOO=n
BAR=n FOO=m
BAR=n FOO=y
BAR=m FOO=n
BAR=m FOO=m
BAR=y FOO=n
BAR=y FOO=m
BAR=y FOO=y
just not BAR=m FOO=y.
Arnd
next prev parent reply other threads:[~2026-07-04 15:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-15 23:06 [PATCH v3] kconfig: Support conditional deps using "depends on X if Y" Graham Roff
2025-12-19 19:56 ` Nathan Chancellor
2026-01-04 22:49 ` Randy Dunlap
2026-01-06 22:06 ` Nathan Chancellor
2026-07-04 13:23 ` Julian Braha
2026-07-04 15:33 ` Arnd Bergmann [this message]
2026-07-04 16:18 ` Julian Braha
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=7e20408b-3a0d-46ff-ab6c-2b0d86f74adc@app.fastmail.com \
--to=arnd@arndb.de \
--cc=corbet@lwn.net \
--cc=grahamr@qti.qualcomm.com \
--cc=jani.nikula@linux.intel.com \
--cc=julianbraha@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=nathan@kernel.org \
--cc=nico@fluxnic.net \
--cc=nsc@kernel.org \
/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