Re: [PATCH v2 2/2] rust: io: gate ioremap doctests on CONFIG_HAS_IOMEM
From: Arnd Bergmann
Date: Wed Aug 05 2026 - 17:46:11 EST
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 <dakr@xxxxxxxxxx>
Reviewed-by: Arnd Bergmann <arnd@xxxxxxxx>