Home
last modified time | relevance | path

Searched refs:N (Results 1 – 11 of 11) sorted by relevance

/rust/kernel/
A Ddevice_id.rs57 pub struct RawIdArray<T: RawDeviceId, const N: usize> {
58 ids: [T::RawType; N],
62 impl<T: RawDeviceId, const N: usize> RawIdArray<T, N> {
71 pub struct IdArray<T: RawDeviceId, U, const N: usize> {
72 raw_ids: RawIdArray<T, N>,
73 id_infos: [U; N],
76 impl<T: RawDeviceId, U, const N: usize> IdArray<T, U, N> {
93 while i < N {
147 impl<T: RawDeviceId + RawDeviceIdIndex, U, const N: usize> IdArray<T, U, N> {
151 pub const fn new(ids: [(T, U); N]) -> Self { in new()
[all …]
A Dfirmware.rs226 pub struct ModInfoBuilder<const N: usize> {
227 buf: [u8; N],
232 impl<const N: usize> ModInfoBuilder<N> {
236 buf: [0; N], in new()
245 if N == 0 { in push_internal()
251 if self.n < N { in push_internal()
282 if N != 0 && self.n == 0 { in push()
296 if N != 0 { in push_module_name()
320 pub const fn build(self) -> [u8; N] { in build() argument
324 if this.n == N {
A Dtransmute.rs32 {<T: FromBytes, const N: usize>} [T; N],
70 {<T: AsBytes, const N: usize>} [T; N],
A Dconfigfs.rs681 pub struct AttributeList<const N: usize, Data>(
684 UnsafeCell<[*mut kernel::ffi::c_void; N]>,
689 unsafe impl<const N: usize, Data> Send for AttributeList<N, Data> {}
692 unsafe impl<const N: usize, Data> Sync for AttributeList<N, Data> {}
694 impl<const N: usize, Data> AttributeList<N, Data> {
749 attributes: &'static AttributeList<N, Data>,
768 pub const fn new<const N: usize>(
770 attributes: &'static AttributeList<N, Data>,
946 const N: usize = $cnt; consts
1009 const N: usize = $cnt + 1usize; consts
[all …]
A Ddma.rs111 pub const fn new<const N: u32>() -> Self { in new()
112 let Ok(mask) = Self::try_new(N) else { in new()
/rust/kernel/block/mq/
A Draw_writer.rs27 pub(crate) fn from_array<const N: usize>( in from_array()
28 a: &'a mut [crate::ffi::c_char; N], in from_array() argument
33 unsafe { core::slice::from_raw_parts_mut(a.as_mut_ptr().cast::<u8>(), N) },
/rust/kernel/net/phy/
A Dreg.rs93 pub const fn vendor_specific<const N: u8>() -> Self { in vendor_specific()
95 N > 0x0f && N < 0x20, in vendor_specific()
98 C22(N) in vendor_specific()
/rust/kernel/device/
A Dproperty.rs268 NArgs::N(nargs) => (ptr::null(), nargs), in property_get_reference_args()
304 N(u32), enumerator
493 impl<const N: usize> Sealed for [$int; N] {}
550 impl<const N: usize> Property for [$int; N] {
552 let mut val: [MaybeUninit<$int>; N] = [const { MaybeUninit::uninit() }; N];
/rust/pin-init/src/
A Dlib.rs1322 pub fn init_array_from_fn<I, const N: usize, T, E>( in init_array_from_fn()
1324 ) -> impl Init<[T; N], E> in init_array_from_fn() argument
1328 let init = move |slot: *mut [T; N]| {
1330 for i in 0..N {
1365 pub fn pin_init_array_from_fn<I, const N: usize, T, E>( in pin_init_array_from_fn()
1367 ) -> impl PinInit<[T; N], E> in pin_init_array_from_fn() argument
1371 let init = move |slot: *mut [T; N]| {
1373 for i in 0..N {
1651 {<const N: usize, T: Zeroable>} [T; N], {<T: Zeroable>} Wrapping<T>,
1679 impl_fn_zeroable_option!(["Rust", "C"] { A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T…
/rust/kernel/alloc/
A Dkvec.rs837 impl<T, A, const N: usize> From<Box<[T; N], A>> for Vec<T, A>
841 fn from(b: Box<[T; N], A>) -> Vec<T, A> { in from() argument
992 [A: Allocator, const N: usize] Vec<T, A>, [U; N],
993 [A: Allocator, const N: usize] Vec<T, A>, &[U; N],
/rust/kernel/net/
A Dphy.rs873 const N: usize = $crate::module_phy_driver!(@count_devices $($dev),+); consts
875 const TABLE: $crate::device_id::IdArray<$crate::net::phy::DeviceId, (), N> =

Completed in 31 milliseconds