Home
last modified time | relevance | path

Searched refs:from_ref (Results 1 – 24 of 24) sorted by relevance

/linux/rust/kernel/debugfs/
H A Dentry.rs75 core::ptr::from_ref(data) as *mut c_void, in dynamic_file()
128 core::ptr::from_ref(data) as *mut c_void, in file()
/linux/rust/zerocopy/src/pointer/
H A Dinner.rs131 pub fn from_ref(ptr: &'a T) -> Self { in from_ref() method
639 let ptr = PtrInner::from_ref(dst); in test_meta()
661 let ptr = PtrInner::from_ref(dst); in test_split_at()
713 let ptr = PtrInner::from_ref(dst); in test_trailing_slice()
H A Dptr.rs178 pub fn from_ref(ptr: &'a T) -> Self { in from_ref() function
179 let inner = PtrInner::from_ref(ptr); in from_ref()
1413 if let Ok((slf, remaining)) = Ptr::from_ref(bytes) in test()
1439 if let Ok(slf) = Ptr::from_ref(bytes) in test()
1512 let ptr = Ptr::from_ref(&bytes[..]); in test_try_cast_into_explicit_count()
1559 let ptr = Ptr::from_ref(&bytes[..]); in test_try_cast_into_no_leftover_restores_original_slice()
/linux/rust/kernel/
H A Dprint.rs117 core::ptr::from_ref(&args).cast::<c_void>(),
137 core::ptr::from_ref(&args).cast::<c_void>(),
H A Dseq_file.rs40 core::ptr::from_ref(&args).cast::<crate::ffi::c_void>(), in call_printf()
H A Dkunit.rs27 core::ptr::from_ref(&args).cast::<c_void>(), in err()
47 core::ptr::from_ref(&args).cast::<c_void>(), in info()
H A Ddevice.rs192 let ptr = core::ptr::from_ref(self); in as_bound()
400 core::ptr::from_ref(&msg).cast::<crate::ffi::c_void>(), in printk()
H A Dconfigfs.rs719 unsafe { (&mut *self.0.get())[I] = core::ptr::from_ref(attribute).cast_mut().cast() }; in add()
759 ct_attrs: core::ptr::from_ref(attributes).cast_mut().cast(),
776 ct_attrs: core::ptr::from_ref(attributes).cast_mut().cast(),
H A Dmodule_param.rs166 core::ptr::from_ref(self).cast_mut().cast()
H A Ddevice_id.rs63 core::ptr::from_ref(self)
81 core::ptr::from_ref(self)
175 core::ptr::from_ref(self).cast()
H A Di2c.rs30 from_ref,
458 from_ref(&self.0) in as_raw()
H A Duaccess.rs616 core::ptr::from_ref(value).cast::<c_void>(), in write()
H A Dbitmap.rs77 core::ptr::from_ref::<Bitmap>(self).cast::<usize>() in as_ptr()
H A Dstr.rs54 unsafe { &*(core::ptr::from_ref(bytes) as *const BStr) }
/linux/rust/zerocopy/src/
H A Dref.rs314 Ptr::from_ref(source.deref()).try_cast_into_no_leftover::<T, BecauseImmutable>(None) in from_bytes()
367 let remainder = match Ptr::from_ref(source.deref()) in from_prefix()
432 let remainder = match Ptr::from_ref(source.deref()) in from_suffix()
633 let ptr = Ptr::from_ref(b); in into_ref()
649 let ptr = Ptr::from_ref(b.into_byte_slice()) in into_ref()
815 let ptr = Ptr::from_ref(b); in deref()
830 let ptr = Ptr::from_ref(b) in deref()
H A Dwrappers.rs203 let inner = Ptr::from_ref(self).transmute(); in try_deref()
412 Ptr::from_ref(self).transmute().bikeshed_recall_aligned().as_ref() in deref()
721 let ro = Ptr::from_ref(t).transmute::<_, _, (_, _)>(); in from()
H A Dlib.rs1883 match Ptr::from_ref(source).try_cast_into_no_leftover::<Self, BecauseImmutable>(None) { in try_ref_from_bytes()
2526 match Ptr::from_ref(source).try_cast_into_no_leftover::<Self, BecauseImmutable>(Some(count)) in try_ref_from_bytes_with_elems()
3303 match Ptr::from_ref(source).try_cast_into::<T, BecauseImmutable>(cast_type, meta) { in try_ref_from_prefix_suffix()
4160 match Ptr::from_ref(source).try_cast_into_no_leftover::<_, BecauseImmutable>(None) { in ref_from_bytes()
4716 let source = Ptr::from_ref(source); in ref_from_bytes_with_elems()
5480 let (slf, prefix_suffix) = Ptr::from_ref(source) in ref_from_prefix_suffix()
H A Dsplit_at.rs308 let source = Ptr::from_ref(self.source); in into_ptr()
H A Dimpls.rs1796 let c = Ptr::from_ref(&*val); in test_impls()
/linux/security/keys/
H A Dkeyctl.c598 key_ref_t key_ref, from_ref, to_ref; in keyctl_keyring_move() local
608 from_ref = lookup_user_key(from_ringid, 0, KEY_NEED_WRITE); in keyctl_keyring_move()
609 if (IS_ERR(from_ref)) { in keyctl_keyring_move()
610 ret = PTR_ERR(from_ref); in keyctl_keyring_move()
620 ret = key_move(key_ref_to_ptr(key_ref), key_ref_to_ptr(from_ref), in keyctl_keyring_move()
625 key_ref_put(from_ref); in keyctl_keyring_move()
/linux/rust/kernel/fs/
H A Dfile.rs376 unsafe { LocalFile::from_raw_file(core::ptr::from_ref(self).cast()) } in deref()
/linux/rust/zerocopy/src/util/
H A Dmod.rs346 let dst = Ptr::from_ref(src).transmute(); in transmute_ref()
511 if meta <= Ptr::from_ref(t).len() { in new_in_bounds()
H A Dmacro_util.rs537 let ptr = Ptr::from_ref(&mu_dst); in try_transmute()
597 let ptr = Ptr::from_ref(self.0); in try_transmute_ref()
878 let ptr = Ptr::from_ref(self.0) in transmute_ref()
/linux/tools/bpf/bpftool/
H A Dbtf.c624 static const char *btf_type_sort_name(const struct btf *btf, __u32 index, bool from_ref) in btf_type_sort_name() argument
633 if (!from_ref && !name_off && btf_vlen(t)) in btf_type_sort_name()