Thread (21 messages) 21 messages, 4 authors, 2026-02-24

Re: [PATCH v15 3/9] rust: Add missing SAFETY documentation for `ARef` example

From: Andreas Hindborg <a.hindborg@kernel.org>
Date: 2026-02-23 15:00:56
Also in: dri-devel, linux-block, linux-fsdevel, linux-mm, linux-pci, linux-pm, linux-security-module, lkml

Alice Ryhl [off-list ref] writes:
On Fri, Feb 20, 2026 at 10:52 AM Andreas Hindborg [off-list ref] wrote:
quoted
From: Oliver Mangold <redacted>

SAFETY comment in rustdoc example was just 'TODO'. Fixed.

Signed-off-by: Oliver Mangold <redacted>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Co-developed-by: Andreas Hindborg <a.hindborg@kernel.org>
Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
---
 rust/kernel/sync/aref.rs | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/rust/kernel/sync/aref.rs b/rust/kernel/sync/aref.rs
index 61caddfd89619..efe16a7fdfa5d 100644
--- a/rust/kernel/sync/aref.rs
+++ b/rust/kernel/sync/aref.rs
@@ -129,12 +129,14 @@ pub unsafe fn from_raw(ptr: NonNull<T>) -> Self {
     /// # Examples
     ///
     /// ```
-    /// use core::ptr::NonNull;
-    /// use kernel::sync::aref::{ARef, RefCounted};
+    /// # use core::ptr::NonNull;
+    /// # use kernel::sync::aref::{ARef, RefCounted};
     ///
Either keep the imports visible or delete this empty line. And either
way, it doesn't really fit in this commit.
I'll drop this for this commit.


Best regards,
Andreas Hindborg

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help