| /linux/rust/kernel/ |
| H A D | mm.rs | 133 pub unsafe fn from_raw<'a>(ptr: *const bindings::mm_struct) -> &'a Mm { in from_raw() method 147 Some(unsafe { ARef::from_raw(NonNull::new_unchecked(self.as_raw().cast())) }) in mmget_not_zero() 163 pub unsafe fn from_raw<'a>(ptr: *const bindings::mm_struct) -> &'a MmWithUser { in from_raw() method 186 vma: unsafe { VmaRef::from_raw(vma) }, in lock_vma_under_rcu() 257 unsafe { Some(virt::VmaRef::from_raw(vma)) } in vma_lookup()
|
| H A D | scatterlist.rs | 70 unsafe fn from_raw<'a>(ptr: *mut bindings::scatterlist) -> &'a Self { in from_raw() 145 pub unsafe fn from_raw<'a>(ptr: *mut bindings::sg_table) -> &'a Self { in from_raw() 166 Some(unsafe { SGEntry::from_raw(ptr) }) in iter() 453 unsafe { SGTable::from_raw(self.inner.sgt.as_raw()) } in deref() 487 unsafe { SGEntry::from_raw(next) } in next() 69 unsafe fn from_raw<'a>(ptr: *mut bindings::scatterlist) -> &'a Self { from_raw() method 144 pub unsafe fn from_raw<'a>(ptr: *mut bindings::sg_table) -> &'a Self { from_raw() method
|
| H A D | bitmap.rs | 35 pub unsafe fn from_raw<'a>(ptr: *const usize, nbits: usize) -> &'a Bitmap { in from_raw() method 178 unsafe { Bitmap::from_raw(ptr, self.nbits) } in deref() 514 let b = unsafe { Bitmap::from_raw(fake_bitmap.as_ptr(), fake_bitmap_len) }; in bitmap_borrow() 523 let b = unsafe { Bitmap::from_raw(core::ptr::addr_of!(fake_bitmap), 8) }; in bitmap_copy()
|
| H A D | pci.rs | 373 Vendor::from_raw(vendor_id) in vendor_id() 444 Class::from_raw(unsafe { (*self.as_raw()).class }) in pci_class() 496 unsafe { device::Device::from_raw(dev) } in as_ref()
|
| H A D | device.rs | 31 /// exist as temporary reference (see also [`Device::from_raw`]), which is only valid within a 66 /// It is always up to the caller of [`Device::from_raw`] to select the correct [`DeviceContext`] 185 unsafe { Self::from_raw(ptr) }.into() in get_device() 357 Some(unsafe { Device::from_raw(parent) }) in parent() 369 pub unsafe fn from_raw<'a>(ptr: *mut bindings::device) -> &'a Self { in from_raw() method
|
| H A D | platform.rs | 279 Some(unsafe { Resource::from_raw(resource) }) in resource_by_index() 300 Some(unsafe { Resource::from_raw(resource) }) in resource_by_name() 534 unsafe { device::Device::from_raw(dev) } in as_ref()
|
| H A D | seq_file.rs | 24 pub unsafe fn from_raw<'a>(ptr: *mut bindings::seq_file) -> &'a SeqFile { in from_raw() method
|
| H A D | faux.rs | 66 unsafe { device::Device::from_raw(addr_of_mut!((*self.as_raw()).dev)) } in drop()
|
| H A D | rbtree.rs | 559 unsafe { drop(KBox::from_raw(this)) }; 925 let node = unsafe { KBox::from_raw(this) }; in remove_current() 961 let node = unsafe { KBox::from_raw(this) }; in remove_neighbor() 1321 // SAFETY: `node` is valid at least until we call `KBox::from_raw`, which only happens when in insert() 1392 node: unsafe { KBox::from_raw(container_of!(self.node_links, Node<K, V>, links)) }, 1410 // SAFETY: `node` is valid at least until we call `KBox::from_raw`, which only happens when in replace() 1423 let old_node = unsafe { KBox::from_raw(container_of!(self.node_links, Node<K, V>, links)) }; in replace()
|
| H A D | auxiliary.rs | 276 let _ = unsafe { KBox::<Opaque<bindings::auxiliary_device>>::from_raw(adev.cast()) }; in release() 318 unsafe { device::Device::from_raw(dev) } in as_ref()
|
| H A D | cpufreq.rs | 234 pub unsafe fn from_raw<'a>(ptr: *const bindings::cpufreq_frequency_table) -> &'a Self { in from_raw() method 312 unsafe { Self::Target::from_raw(self.as_raw()) } in deref() 425 pub unsafe fn from_raw<'a>(ptr: *const bindings::cpufreq_policy) -> &'a Self { in from_raw() method 619 Ok(unsafe { Table::from_raw(self.as_ref().freq_table) }) in freq_table()
|
| H A D | list.rs | 702 unsafe { ListArc::from_raw(raw_item) } in push_all_back() 825 Some(unsafe { ArcBorrow::from_raw(item) }) 1155 unsafe { ArcBorrow::from_raw(me) } in deref()
|
| H A D | usb.rs | 368 unsafe { device::Device::from_raw(dev) } in as_ref() 456 unsafe { device::Device::from_raw(dev) } in as_ref()
|
| /linux/rust/kernel/mm/ |
| H A D | virt.rs | 49 pub unsafe fn from_raw<'a>(vma: *const bindings::vm_area_struct) -> &'a Self { in from_raw() method 66 unsafe { MmWithUser::from_raw((*self.as_ptr()).vm_mm) } in mm() 140 Some(unsafe { VmaMixedMap::from_raw(self.as_ptr()) }) in as_mixedmap_vma() 183 pub unsafe fn from_raw<'a>(vma: *const bindings::vm_area_struct) -> &'a Self { 232 pub unsafe fn from_raw<'a>(vma: *mut bindings::vm_area_struct) -> &'a Self { 265 unsafe { VmaMixedMap::from_raw(self.vma.as_ptr()) } in set_mixedmap() 185 pub unsafe fn from_raw<'a>(vma: *const bindings::vm_area_struct) -> &'a Self { from_raw() method 234 pub unsafe fn from_raw<'a>(vma: *mut bindings::vm_area_struct) -> &'a Self { from_raw() method
|
| H A D | mmput_async.rs | 66 unsafe { ARef::from_raw(ARef::into_raw(me).cast()) } in into_mmput_async()
|
| /linux/rust/kernel/alloc/ |
| H A D | kbox.rs | 154 pub const unsafe fn from_raw(raw: *mut T) -> Self { 163 /// indefinitely. Use [`Box::from_raw`] to recover the [`Box`], drop the value and free the 172 /// let x = unsafe { KBox::from_raw(ptr) }; 211 unsafe { Box::from_raw(raw.cast()) } in leak() 343 Ok(Pin::from(unsafe { Box::from_raw(slice) })) in pin_slice() 357 unsafe { Box::from_raw(ptr.cast()) } in pin_slice() 478 unsafe { Box::from_raw(ptr.cast()) } in try_init() 513 unsafe { Pin::new_unchecked(Box::from_raw(ptr.cast())) } in borrow_mut() 179 pub const unsafe fn from_raw(raw: *mut T) -> Self { from_raw() function
|
| H A D | allocator.rs | 204 unsafe { page::BorrowedPage::from_raw(page) } in to_page()
|
| /linux/drivers/android/binder/ |
| H A D | rust_binder_main.rs | 436 let area = unsafe { kernel::mm::virt::VmaNew::from_raw(vma) }; in rust_binder_mmap() 455 match Process::poll(f, fileref, unsafe { PollTable::from_raw(wait) }) { in rust_binder_poll() 484 let m = unsafe { SeqFile::from_raw(ptr) }; in rust_binder_stats_show() 500 let m = unsafe { SeqFile::from_raw(ptr) }; in rust_binder_state_show() 518 let m = unsafe { SeqFile::from_raw(ptr) }; in rust_binder_proc_show() 534 let m = unsafe { SeqFile::from_raw(ptr) }; in rust_binder_transactions_show()
|
| /linux/rust/kernel/drm/ |
| H A D | ioctl.rs | 137 let dev = $crate::drm::device::Device::from_raw(raw_dev); 148 let file = unsafe { $crate::drm::File::from_raw(raw_file) };
|
| /linux/rust/kernel/io/ |
| H A D | resource.rs | 43 unsafe { Resource::from_raw(self.resource.as_ptr()) } in deref() 91 pub(crate) const unsafe fn from_raw<'a>(ptr: *mut bindings::resource) -> &'a Self { in from_raw() method
|
| H A D | mem.rs | 296 unsafe { Mmio::from_raw(&self.io) }
|
| /linux/rust/kernel/fs/ |
| H A D | file.rs | 271 Ok(unsafe { ARef::from_raw(ptr.cast()) }) in fget() 312 unsafe { ARef::from_raw(ARef::into_raw(me).cast()) } in assume_no_fdget_pos()
|
| /linux/rust/kernel/sync/ |
| H A D | poll.rs | 42 pub unsafe fn from_raw(table: *mut bindings::poll_table) -> Self { in from_raw() method
|
| H A D | lock.rs | 160 pub unsafe fn from_raw<'a>(ptr: *mut B::State) -> &'a Self { in from_raw() 159 pub unsafe fn from_raw<'a>(ptr: *mut B::State) -> &'a Self { from_raw() method
|
| /linux/rust/kernel/list/ |
| H A D | arc.rs | 358 /// * `ptr` must satisfy the safety requirements of [`Arc::from_raw`]. 362 pub unsafe fn from_raw(ptr: *const T) -> Self { in from_raw() 363 // SAFETY: The pointer satisfies the safety requirements for `Arc::from_raw`. in from_raw() 364 let arc = unsafe { Arc::from_raw(ptr) }; in from_raw() 361 pub unsafe fn from_raw(ptr: *const T) -> Self { from_raw() function
|