Re: [PATCH v2 2/2] rust: io: gate ioremap doctests on CONFIG_HAS_IOMEM

"Arnd Bergmann" <[email protected]>
Newsgroups dev.linux.lists.driver-core,org.kernel.vger.linux-kernel,org.kernel.vger.rust-for-linux
Message-ID <[email protected]>
On Wed, Aug 5, 2026, at 23:28, Danilo Krummrich wrote:
> The doc examples in io.rs and devres.rs directly call
> bindings::ioremap() and bindings::iounmap(), which do not exist when
> CONFIG_HAS_IOMEM is not set. This causes build failures with
> CONFIG_RUST_KERNEL_DOCTESTS=y on such configurations (e.g. s390
> allnoconfig).
>
> Gate the affected doctests with `#![cfg(CONFIG_HAS_IOMEM)]` so they are
> skipped when IOMEM is unavailable.
>
> Fixes: 3f70ebe63858 ("s390: Enable Rust support")
> Signed-off-by: Danilo Krummrich <[email protected]>

Reviewed-by: Arnd Bergmann <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.