* [PATCH] rust/drm: Fix Registration::{new,new_foreign_owned}() docs
@ 2026-01-22 22:10 Lyude Paul
2026-01-23 18:23 ` Danilo Krummrich
0 siblings, 1 reply; 2+ messages in thread
From: Lyude Paul @ 2026-01-22 22:10 UTC (permalink / raw)
To: linux-kernel, dri-devel, rust-for-linux, Danilo Krummrich
Cc: Miguel Ojeda, Simona Vetter, Alice Ryhl, David Airlie, Lyude Paul
Looks like we've actually had a malformed rustdoc reference in the rustdocs
for Registration::new_foreign_owned() for a while that, when fixed, still
couldn't resolve properly because it refers to a private item.
This is probably leftover from when Registration::new() was public, so drop
the documentation from that function and fixup the documentation for
Registration::new_foreign_owned().
Signed-off-by: Lyude Paul <lyude@redhat.com>
---
rust/kernel/drm/driver.rs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/rust/kernel/drm/driver.rs b/rust/kernel/drm/driver.rs
index f30ee4c6245cd..e09f977b5b519 100644
--- a/rust/kernel/drm/driver.rs
+++ b/rust/kernel/drm/driver.rs
@@ -121,7 +121,6 @@ pub trait Driver {
pub struct Registration<T: Driver>(ARef<drm::Device<T>>);
impl<T: Driver> Registration<T> {
- /// Creates a new [`Registration`] and registers it.
fn new(drm: &drm::Device<T>, flags: usize) -> Result<Self> {
// SAFETY: `drm.as_raw()` is valid by the invariants of `drm::Device`.
to_result(unsafe { bindings::drm_dev_register(drm.as_raw(), flags) })?;
@@ -129,8 +128,9 @@ fn new(drm: &drm::Device<T>, flags: usize) -> Result<Self> {
Ok(Self(drm.into()))
}
- /// Same as [`Registration::new`}, but transfers ownership of the [`Registration`] to
- /// [`devres::register`].
+ /// Registers a new [`Device`](drm::Device) with userspace.
+ ///
+ /// Ownership of the [`Registration`] object is passed to [`devres::register`].
pub fn new_foreign_owned(
drm: &drm::Device<T>,
dev: &device::Device<device::Bound>,
base-commit: 6ea52b6d8f33ae627f4dcf43b12b6e713a8b9331
--
2.52.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rust/drm: Fix Registration::{new,new_foreign_owned}() docs
2026-01-22 22:10 [PATCH] rust/drm: Fix Registration::{new,new_foreign_owned}() docs Lyude Paul
@ 2026-01-23 18:23 ` Danilo Krummrich
0 siblings, 0 replies; 2+ messages in thread
From: Danilo Krummrich @ 2026-01-23 18:23 UTC (permalink / raw)
To: Lyude Paul
Cc: linux-kernel, dri-devel, rust-for-linux, Miguel Ojeda,
Simona Vetter, Alice Ryhl, David Airlie
On Thu Jan 22, 2026 at 11:10 PM CET, Lyude Paul wrote:
> Looks like we've actually had a malformed rustdoc reference in the rustdocs
> for Registration::new_foreign_owned() for a while that, when fixed, still
> couldn't resolve properly because it refers to a private item.
>
> This is probably leftover from when Registration::new() was public, so drop
> the documentation from that function and fixup the documentation for
> Registration::new_foreign_owned().
>
> Signed-off-by: Lyude Paul <lyude@redhat.com>
I'd add a Fixes: tag for this, since it's user facing documentation.
Acked-by: Danilo Krummrich <dakr@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-23 18:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-22 22:10 [PATCH] rust/drm: Fix Registration::{new,new_foreign_owned}() docs Lyude Paul
2026-01-23 18:23 ` Danilo Krummrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox