Home
last modified time | relevance | path

Searched refs:size_of (Results 1 – 25 of 25) sorted by relevance

/linux/drivers/android/binder/
H A Dallocation.rs5 use core::mem::{size_of, size_of_val, MaybeUninit};
109 self.size_check(offset, size_of::<T>())?; in read()
254 for i in offsets.step_by(size_of::<usize>()) { in drop()
335 if offset.checked_add(size_of::<T>()).ok_or(EINVAL)? > self.limit { in read()
342 if offset.checked_add(size_of::<T>()).ok_or(EINVAL)? > self.limit { in write()
497 R: FnOnce(&mut [u8; size_of::<BinderObject>()]) -> Result<()>, in read_from_inner()
547 BINDER_TYPE_WEAK_BINDER => Some(size_of::<uapi::flat_binder_object>()), in type_to_size()
548 BINDER_TYPE_BINDER => Some(size_of::<uapi::flat_binder_object>()), in type_to_size()
549 BINDER_TYPE_WEAK_HANDLE => Some(size_of::<uapi::flat_binder_object>()), in type_to_size()
550 BINDER_TYPE_HANDLE => Some(size_of::<uapi::flat_binder_object>()), in type_to_size()
[all …]
H A Dthread.rs37 use core::mem::size_of;
762 size_of::<u64>(), in translate_object()
804 let fds_len = num_fds.checked_mul(size_of::<u32>()).ok_or(EINVAL)?; in translate_object()
806 if !is_aligned(parent_offset, size_of::<u32>()) { in translate_object()
824 if !is_aligned(parent_entry.sender_uaddr, size_of::<u32>()) { in translate_object()
854 for i in (0..fds_len).step_by(size_of::<u32>()) { in translate_object()
856 let mut fd_bytes = [0u8; size_of::<u32>()]; in translate_object()
857 fd_bytes.copy_from_slice(&fda_bytes[i..i + size_of::<u32>()]); in translate_object()
898 (size_of::<u64>(), *target_offset) in apply_sg()
983 if !is_aligned(offsets_size, size_of::<u64>()) { in copy_transaction_data()
[all …]
H A Dpage_range.rs20 mem::{size_of, size_of_val, MaybeUninit},
572 self.iterate(offset, size_of::<T>(), |page, offset, to_copy| { in read()
H A Drust_binder_main.rs284 let size = core::mem::size_of::<usize>() - 1; in ptr_align()
/linux/rust/kernel/sync/
H A Dlocked_by.rs7 use core::{cell::UnsafeCell, mem::size_of, ptr};
104 size_of::<Lock<U, B>>() > 0, in new()
130 size_of::<U>() > 0, in access()
159 size_of::<U>() > 0, in access_mut()
/linux/rust/kernel/sync/atomic/
H A Dpredefine.rs6 use core::mem::{align_of, size_of};
10 static_assert!(size_of::<bool>() == size_of::<i8>());
100 static_assert!(size_of::<isize>() == size_of::<isize_atomic_repr>());
102 static_assert!(size_of::<usize>() == size_of::<isize_atomic_repr>());
/linux/drivers/gpu/nova-core/
H A Dgsp.rs92 &mut obj.0.as_mut()[size_of::<u64>()..][..RM_LOG_BUFFER_NUM_PAGES * size_of::<u64>()] in new()
96 for (i, chunk) in pte_region.chunks_exact_mut(size_of::<u64>()).enumerate() { in new()
149 GSP_PAGE_SIZE / size_of::<LibosMemoryRegionInitArgument>(), in new()
/linux/rust/kernel/
H A Dptr.rs10 size_of, //
245 size_of::<T>() in size()
252 p.len() * size_of::<T>() in size()
H A Dbug.rs42 size = const ::core::mem::size_of::<$crate::bindings::bug_entry>(),
68 size = const ::core::mem::size_of::<$crate::bindings::bug_entry>(),
H A Duaccess.rs18 use core::mem::{size_of, MaybeUninit};
340 let len = size_of::<T>(); in read()
603 let len = size_of::<T>(); in write()
H A Ddma.rs714 core::mem::size_of::<T>() > 0, in alloc_with_attrs()
724 core::mem::size_of::<T>(), in alloc_with_attrs()
825 core::mem::size_of::<T>() > 0, in alloc_slice_with_attrs()
835 let size = core::mem::size_of::<T>().checked_mul(len).ok_or(ENOMEM)?; in alloc_slice_with_attrs()
H A Dprelude.rs19 size_of,
H A Ddevice.rs26 static_assert!(core::mem::size_of::<bindings::driver_type>() >= core::mem::size_of::<TypeId>());
H A Ddevice_id.rs65 core::mem::size_of::<Self>() in size()
H A Dio.rs148 let type_size = core::mem::size_of::<U>(); in offset_valid()
/linux/rust/
H A Dffi.rs20 ::core::mem::size_of::<$name>() == ::core::mem::size_of::<::core::ffi::$name>()
/linux/drivers/gpu/nova-core/gsp/
H A Dcmdq.rs120 size_of::<Self::Command>() + self.variable_payload_len() in size()
205 const PTE_ARRAY_SIZE: usize = GSP_PAGE_SIZE / size_of::<u64>();
232 const MSGQ_SIZE: u32 = num::usize_into_u32::<{ size_of::<Msgq>() }>(); in new()
367 if size_of::<GspMsgElement>() + size > GSP_MSG_QUEUE_ELEMENT_SIZE_MAX { in allocate_command()
372 |available_bytes| *available_bytes >= size_of::<GspMsgElement>() + size, in allocate_command()
500 pub(crate) const NUM_PTES: usize = size_of::<GspMem>() >> GSP_PAGE_SHIFT;
H A Dfw.rs654 let mut bytes = [0u8; core::mem::size_of::<u64>()]; in new()
755 length: size_of::<Self>() in init()
792 elemCount: size_of::<Self>() in init()
819 .saturating_sub(size_of::<bindings::rpc_message_header_v>()) in payload_length()
824 size_of::<Self>() + self.payload_length() in length()
888 _padding: [u8; GSP_PAGE_SIZE - core::mem::size_of::<bindings::GSP_ARGUMENTS_CACHED>()],
/linux/rust/kernel/block/mq/
H A Dtag_set.rs42 let tag_set: Result<_> = core::mem::size_of::<RequestDataWrapper>() in new()
/linux/rust/kernel/debugfs/
H A Dcallback_adapters.rs124 const { assert!(core::mem::size_of::<F>() == 0) };
/linux/rust/kernel/drm/
H A Dioctl.rs112 ::core::assert!(core::mem::size_of::<$crate::uapi::$struct>() ==
/linux/rust/kernel/alloc/
H A Dkvec.rs179 core::mem::size_of::<T>() == 0 in is_zst()
803 let current_size = self.capacity() * core::mem::size_of::<T>(); in shrink_to()
804 let target_size = target_cap * core::mem::size_of::<T>(); in shrink_to()
H A Dkbox.rs687 let size = core::mem::size_of::<T>();
/linux/drivers/net/ethernet/intel/i40e/
H A Di40e_lan_hmc.c663 u16 size_of; member
943 switch (ce_info[f].size_of) { in i40e_set_hmc_context()
/linux/drivers/net/can/usb/peak_usb/
H A Dpcan_usb_fd.c43 __le16 size_of; /* sizeof this */ member