IntoGEMObject::from_raw() takes a drm_gem_object pointer.

Its Safety docs described the argument as a pointer to Self, which does
not match the function signature. Update the docs to point to the actual 
pointer type accepted by the API.

Assisted-by: Codex:GPT-5
Signed-off-by: Yilin Chen <[email protected]>
---
 rust/kernel/drm/gem/mod.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/kernel/drm/gem/mod.rs b/rust/kernel/drm/gem/mod.rs
index c8b66d816..90b256093 100644
--- a/rust/kernel/drm/gem/mod.rs
+++ b/rust/kernel/drm/gem/mod.rs
@@ -118,7 +118,7 @@ pub trait IntoGEMObject: Sized + super::private::Sealed + 
AlwaysRefCounted {
     ///
     /// # Safety
     ///
-    /// - `self_ptr` must be a valid pointer to `Self`.
+    /// - `self_ptr` must be a valid pointer to `struct drm_gem_object`.
     /// - The caller promises that holding the immutable reference returned by 
this function does
     ///   not violate rust's data aliasing rules and remains valid throughout 
the lifetime of `'a`.
     unsafe fn from_raw<'a>(self_ptr: *mut bindings::drm_gem_object) -> &'a 
Self;
-- 
2.25.1

Reply via email to