| /linux/rust/kernel/drm/gem/ |
| H A D | mod.rs | 124 unsafe fn from_raw<'a>(self_ptr: *mut bindings::drm_gem_object) -> &'a Self; in open_callback() 132 let file = unsafe { DriverFile::<T>::from_raw(raw_file) }; 139 let obj: &DriverAllocImpl<T> = unsafe { IntoGEMObject::from_raw(raw_obj) }; in close_callback() 152 let file = unsafe { DriverFile::<T>::from_raw(raw_file) }; in from_raw() method 156 let obj: &DriverAllocImpl<T> = unsafe { IntoGEMObject::from_raw(raw_obj) }; in from_raw() 166 unsafe fn from_raw<'a>(self_ptr: *mut bindings::drm_gem_object) -> &'a Self { 214 // - And we check if the pointer is null befoe calling from_raw(), ensuring that `ptr` is a in create_mmap_offset() 216 let obj = unsafe { Self::from_raw(ptr) }; in create_mmap_offset() 222 Ok(unsafe { ARef::from_raw(obj.into()) }) 293 unsafe { drm::Device::from_raw((*sel in new() 113 unsafe fn from_raw<'a>(self_ptr: *mut bindings::drm_gem_object) -> &'a Self; from_raw() method [all...] |
| H A D | shmem.rs | 158 unsafe { Device::from_raw((*self.as_raw()).dev) } in free_callback() 188 let _ = unsafe { KBox::from_raw(this) }; in deref_mut() 329 let obj = unsafe { ARef::from_raw(NonNull::new_unchecked(new)) }; 377 unsafe fn from_raw<'a>(obj: *mut bindings::drm_gem_object) -> &'a Self { 542 unsafe { scatterlist::SGTable::from_raw((*self.obj.as_ref().as_raw_shmem()).sgt) } 203 unsafe fn from_raw<'a>(obj: *mut bindings::drm_gem_object) -> &'a Object<T> { from_raw() method
|
| /linux/rust/kernel/ |
| H A D | task.rs | 217 Kuid::from_raw(unsafe { bindings::task_uid(self.as_ptr()) }) in uid() 238 Some(unsafe { ARef::from_raw(ptr::NonNull::new_unchecked(ptr.cast::<PidNamespace>())) }) in get_pid_ns() 294 Some(unsafe { MmWithUser::from_raw(mm) }) in mm() 371 Self::from_raw(unsafe { bindings::current_euid() }) 376 pub fn from_raw(kuid: bindings::kuid_t) -> Self { in current_euid() 383 pub fn from_raw(kuid: bindings::kuid_t) -> Self { from_raw() method
|
| 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 | bitfield.rs | 319 $vis const fn from_raw(value: $storage) -> Self { 346 Self::from_raw(val) 762 assert_eq!(TestU64::from_raw(raw).field_15_12(), Err(0x7)); in test_fallible_conversion() 810 let val = set_all_fields(TestU64::from_raw(0)); in test_unallocated_bits() 814 let val = set_all_fields(TestU64::from_raw(gap_bits)); in test_unallocated_bits() 838 let val = TestU64::from_raw(raw); in test_raw() 849 let val = TestU16::from_raw(raw); in test_raw() 857 let val = TestU8::from_raw(raw); in test_raw()
|
| H A D | bitmap.rs | 35 pub unsafe fn from_raw<'a>(ptr: *const usize, nbits: usize) -> &'a Bitmap { in from_raw() method 69 // Similar to `from_raw`, casting `*mut [()]` to `*mut Bitmap` is in from_raw_mut() 178 unsafe { Bitmap::from_raw(ptr, self.nbits) } in deref() 513 let b = unsafe { Bitmap::from_raw(fake_bitmap.as_ptr(), fake_bitmap_len) }; in bitmap_borrow() 522 let b = unsafe { Bitmap::from_raw(core::ptr::addr_of!(fake_bitmap), 8) }; in bitmap_copy()
|
| H A D | pci.rs | 375 Vendor::from_raw(vendor_id) 446 Class::from_raw(unsafe { (*self.as_raw()).class }) 512 unsafe { device::Device::from_raw(dev) } in try_from()
|
| H A D | device.rs | 182 unsafe { Self::from_raw(ptr) }.into() in get_device() 284 Some(unsafe { Device::from_raw(parent) }) in parent() 296 pub unsafe fn from_raw<'a>(ptr: *mut bindings::device) -> &'a Self { in from_raw() method
|
| 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 | 48 unsafe fn from_raw<'a>(ptr: *mut bindings::faux_device) -> &'a Self { in as_raw() 59 unsafe { device::Device::from_raw(&raw mut (*self.as_raw()).dev) } 123 unsafe { Device::from_raw(self.as_raw()) }
|
| H A D | platform.rs | 284 Some(unsafe { Resource::from_raw(resource) }) in resource_by_index() 305 Some(unsafe { Resource::from_raw(resource) }) in resource_by_name() 556 unsafe { device::Device::from_raw(dev) } in as_ref()
|
| 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 | 363 let _ = unsafe { KBox::<Opaque<bindings::auxiliary_device>>::from_raw(adev.cast()) }; in new() 405 unsafe { device::Device::from_raw(dev) } in drop()
|
| H A D | devres.rs | 289 drop(unsafe { Arc::from_raw(inner) }); in devres_node_free_node() 382 drop(unsafe { Arc::from_raw(Arc::as_ptr(&self.inner)) }); in drop()
|
| 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()
|
| /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/sync/ |
| H A D | aref.rs | 110 pub unsafe fn from_raw(ptr: NonNull<T>) -> Self { 141 /// let data_ref: ARef<Empty> = unsafe { ARef::from_raw(ptr) }; 155 unsafe { Self::from_raw(self.ptr) } in deref() 172 unsafe { Self::from_raw(NonNull::from(b)) } 223 unsafe { ARef::from_raw(ptr) } 100 pub unsafe fn from_raw(ptr: NonNull<T>) -> Self { from_raw() method
|
| H A D | poll.rs | 46 pub unsafe fn from_raw(table: *mut bindings::poll_table) -> Self { in from_raw() 42 pub unsafe fn from_raw(table: *mut bindings::poll_table) -> Self { from_raw() method
|
| /linux/rust/kernel/alloc/ |
| H A D | kbox.rs | 177 pub const unsafe fn from_raw(raw: *mut T) -> Self { 186 /// indefinitely. Use [`Box::from_raw`] to recover the [`Box`], drop the value and free the 195 /// let x = unsafe { KBox::from_raw(ptr) }; 234 unsafe { Box::from_raw(raw.cast()) } in assume_init() 390 Ok(Pin::from(unsafe { Box::from_raw(slice) })) 404 unsafe { Box::from_raw(ptr.cast()) } in drop_contents() 533 unsafe { Box::from_raw(ptr.cast()) } in into_foreign() 574 unsafe { Pin::new_unchecked(Box::from_raw(ptr.cast())) } in deref() 179 pub const unsafe fn from_raw(raw: *mut T) -> Self { from_raw() function
|
| /linux/rust/kernel/drm/ |
| H A D | ioctl.rs | 155 $crate::drm::device::Device::from_raw(raw_dev); 196 let file = unsafe { $crate::drm::File::from_raw(raw_file) };
|
| H A D | device.rs | 260 Ok(Self(unsafe { ARef::from_raw(raw_drm) }, NotThreadSafe)) 316 pub unsafe fn from_raw<'a>(ptr: *const bindings::drm_device) -> &'a Self { 502 let dev = unsafe { device::Device::from_raw((*self.as_raw()).dev) }; 200 pub unsafe fn from_raw<'a>(ptr: *const bindings::drm_device) -> &'a Self { from_raw() method
|
| /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
|
| /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()
|