From: Danilo Krummrich <dakr@kernel.org>
To: Miguel Ojeda <ojeda@kernel.org>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <benno.lossin@proton.me>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
patches@lists.linux.dev
Subject: Re: [PATCH] rust: devres: fix doctest build under `!CONFIG_PCI`
Date: Mon, 12 May 2025 09:47:02 +0200 [thread overview]
Message-ID: <aCGndjmLQMXM76I3@pollux> (raw)
In-Reply-To: <20250511182533.1016163-1-ojeda@kernel.org>
On Sun, May 11, 2025 at 08:25:33PM +0200, Miguel Ojeda wrote:
> The doctest requires `CONFIG_PCI`:
>
> error[E0432]: unresolved import `kernel::pci`
> --> rust/doctests_kernel_generated.rs:2689:44
> |
> 2689 | use kernel::{device::Core, devres::Devres, pci};
> | ^^^ no `pci` in the root
> |
> note: found an item that was configured out
> --> rust/kernel/lib.rs:96:9
> note: the item is gated here
> --> rust/kernel/lib.rs:95:1
>
> Thus conditionally compile it (which still checks the syntax).
>
> Fixes: f301cb978c06 ("rust: devres: implement Devres::access()")
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Good catch!
Once we have the platform ioremap() abstractions [1], which are always built-in,
we should use those for the doctests. Maybe this could be a good first issue.
Applied to nova-next, thanks!
[1] https://lore.kernel.org/rust-for-linux/20250509-topics-tyr-platform_iomem-v8-3-e9f1725a40da@collabora.com/
prev parent reply other threads:[~2025-05-12 7:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-11 18:25 [PATCH] rust: devres: fix doctest build under `!CONFIG_PCI` Miguel Ojeda
2025-05-11 18:28 ` Miguel Ojeda
2025-05-12 7:47 ` Danilo Krummrich [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=aCGndjmLQMXM76I3@pollux \
--to=dakr@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=gary@garyguo.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=patches@lists.linux.dev \
--cc=rafael@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
/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).