From 22fb7c7d5c8ac1f0919a3afdc788b2d8f1ec83e6 Mon Sep 17 00:00:00 2001 From: Antonio Hickey Date: Mon, 10 Mar 2025 21:04:16 -0400 Subject: [PATCH] rust: kernel: uaccess: mark UserSliceReader methods inline --- rust/kernel/uaccess.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rust/kernel/uaccess.rs b/rust/kernel/uaccess.rs index 719b0a48ff5550..3d8a08aeed89cf 100644 --- a/rust/kernel/uaccess.rs +++ b/rust/kernel/uaccess.rs @@ -218,6 +218,7 @@ impl UserSliceReader { /// # Guarantees /// /// After a successful call to this method, all bytes in `out` are initialized. + #[inline] pub fn read_raw(&mut self, out: &mut [MaybeUninit]) -> Result { let len = out.len(); let out_ptr = out.as_mut_ptr().cast::(); @@ -239,6 +240,7 @@ impl UserSliceReader { /// /// Fails with [`EFAULT`] if the read happens on a bad address, or if the read goes out of /// bounds of this [`UserSliceReader`]. This call may modify `out` even if it returns an error. + #[inline] pub fn read_slice(&mut self, out: &mut [u8]) -> Result { // SAFETY: The types are compatible and `read_raw` doesn't write uninitialized bytes to // `out`.