Replace explicit imports of `transmute::FromBytes`/`AsBytes` marker traits with their zerocopy equivalents. Link: https://github.com/Rust-for-Linux/linux/issues/1241 Signed-off-by: Sagar Taunk --- rust/kernel/uaccess.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rust/kernel/uaccess.rs b/rust/kernel/uaccess.rs index 5f6c4d7a1a51..d93c1a21f324 100644 --- a/rust/kernel/uaccess.rs +++ b/rust/kernel/uaccess.rs @@ -13,7 +13,6 @@ fs::file, prelude::*, ptr::KnownSize, - transmute::{AsBytes, FromBytes}, }; use core::mem::{size_of, MaybeUninit}; @@ -525,7 +524,7 @@ pub fn write_slice(&mut self, data: &[u8]) -> Result { /// writer.write_dma(alloc, 0, 256) /// } /// ``` - pub fn write_dma( + pub fn write_dma( &mut self, alloc: &Coherent, offset: usize, @@ -599,7 +598,7 @@ pub fn write_slice_file(&mut self, data: &[u8], offset: &mut file::Offset) -> Re /// Fails with [`EFAULT`] if the write happens on a bad address, or if the write goes out of /// bounds of this [`UserSliceWriter`]. This call may modify the associated userspace slice even /// if it returns an error. - pub fn write(&mut self, value: &T) -> Result { + pub fn write(&mut self, value: &T) -> Result { let len = size_of::(); if len > self.length { return Err(EFAULT); -- 2.55.0