mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Masahiro Yamada <masahiroy@kernel.org>,
	Nathan Chancellor <nathan@kernel.org>,
	Nicolas Schier <nicolas@fjasle.eu>,
	Jonathan Corbet <corbet@lwn.net>,
	linux-kbuild@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH] docs: kconfig: Mention IS_REACHABLE as way for optional dependency
Date: Sat, 15 Feb 2025 13:44:09 +0100	[thread overview]
Message-ID: <c95582e4-9ac3-4636-8a4b-3d27ebcb28ee@linaro.org> (raw)
In-Reply-To: <20250215114223.140688-1-krzysztof.kozlowski@linaro.org>

On 15/02/2025 12:42, Krzysztof Kozlowski wrote:
> @@ -580,10 +582,15 @@ 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::
> +There are two ways to express this optional dependency:
>  
> -  config FOO
> +1. If pre-processor can discard entire optional code or module FOO does not
> +   provide !FOO stubs then in the C code :ref:`IS_REACHABLE<is_reachable>`
> +
> +2. Otherwise (and module FOO must provide all !FOO stubs) use the slightly

Obviously this should be "module BAR", similarly above.

I will send a v2.

> +   counterintuitive Kconfig syntax::
> +
> +     config FOO
>  	tristate "Support for foo hardware"
>  	depends on BAR || !BAR
>  


Best regards,
Krzysztof

  reply	other threads:[~2025-02-15 12:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-15 11:42 Krzysztof Kozlowski
2025-02-15 12:44 ` Krzysztof Kozlowski [this message]
2025-02-15 12:54 ` Masahiro Yamada
2025-02-15 13:01   ` Krzysztof Kozlowski
2025-02-15 13:06     ` Krzysztof Kozlowski
2025-02-15 14:19     ` 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=c95582e4-9ac3-4636-8a4b-3d27ebcb28ee@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=arnd@arndb.de \
    --cc=corbet@lwn.net \
    --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=nicolas@fjasle.eu \
    /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

all inboxes | Powered by JetHome®