From: Jani Nikula <jani.nikula@linux.intel.com>
To: 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>,
Graham Roff <grahamr@qti.qualcomm.com>
Subject: Re: [PATCH v2] Support conditional deps using "depends on X if Y"
Date: Fri, 05 Dec 2025 11:06:56 +0200 [thread overview]
Message-ID: <19f6c99dfcc2a9c2ca4c43ba0ad352fc978c1cc9@intel.com> (raw)
In-Reply-To: <20251118-kconfig_conditional_deps-v2-1-e360792edaed@qti.qualcomm.com>
On Tue, 18 Nov 2025, Graham Roff <grahamr@qti.qualcomm.com> wrote:
> @@ -602,8 +612,14 @@ Some drivers are able to optionally use a feature from another module
> or build cleanly with that module disabled, but cause a link failure
> when trying to use that loadable module from a built-in driver.
>
> -The most common way to express this optional dependency in Kconfig logic
> -uses the slightly counterintuitive::
> +The recommended way to express this optional dependency in Kconfig logic
> +uses the conditional form::
> +
> + config FOO
> + tristate "Support for foo hardware"
> + depends on BAR if BAR
> +
> +This slightly counterintuitive style is also widely used::
>
> config FOO
> tristate "Support for foo hardware"
Thanks for adding this documentation hunk.
BR,
Jani.
--
Jani Nikula, Intel
prev parent reply other threads:[~2025-12-05 9:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-18 18:46 [PATCH v2] Support conditional deps using "depends on X if Y" Graham Roff
2025-12-05 1:53 ` Nathan Chancellor
2025-12-05 8:01 ` Arnd Bergmann
2025-12-05 16:14 ` Nicolas Pitre
2025-12-05 18:23 ` Nathan Chancellor
2025-12-09 22:45 ` Graham Roff
2025-12-10 15:07 ` Jani Nikula
2025-12-13 1:40 ` Nathan Chancellor
2025-12-05 9:06 ` Jani Nikula [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=19f6c99dfcc2a9c2ca4c43ba0ad352fc978c1cc9@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=corbet@lwn.net \
--cc=grahamr@qti.qualcomm.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.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;
as well as URLs for NNTP newsgroup(s).