Home
last modified time | relevance | path

Searched refs:from_raw_parts (Results 1 – 8 of 8) sorted by relevance

/linux/rust/kernel/
H A Dsecurity.rs56 // We can't pass a null pointer to `slice::from_raw_parts` even if the length is zero. in as_bytes()
63 unsafe { core::slice::from_raw_parts(ptr.cast(), self.len()) } in as_bytes()
H A Dfirmware.rs105 unsafe { core::slice::from_raw_parts((*self.as_raw()).data, self.size()) } in data()
H A Ddma.rs427 Ok(unsafe { core::slice::from_raw_parts(self.cpu_addr.add(offset), count) }) in as_slice()
H A Dstr.rs249 let bytes = unsafe { core::slice::from_raw_parts(ptr.cast(), len) }; in from_char_ptr()
H A Dconfigfs.rs601 unsafe { core::slice::from_raw_parts(page.cast(), size) }, in store()
/linux/rust/kernel/alloc/
H A Dkvec.rs513 /// let v = unsafe { KVec::from_raw_parts(ptr, len, cap) };
537 pub unsafe fn from_raw_parts(ptr: *mut T, length: usize, capacity: usize) -> Self { in from_raw_parts() function
561 /// will stay alive indefinitely. Use [`Vec::from_raw_parts`] to recover the [`Vec`], drop the
851 unsafe { Vec::from_raw_parts(ptr.cast(), len, len) }
878 unsafe { slice::from_raw_parts(self.as_ptr(), self.len) } in deref()
1133 unsafe { Vec::from_raw_parts(ptr, len, cap) } in collect()
/linux/rust/kernel/device/
H A Dproperty.rs340 unsafe { core::slice::from_raw_parts(self.0.args.as_ptr(), self.0.nargs as usize) } in as_slice()
/linux/drivers/gpu/nova-core/
H A Dvbios.rs1156 core::slice::from_raw_parts( in sigs()