Home
last modified time | relevance | path

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

12

/rust/kernel/net/phy/
A Dreg.rs56 pub struct C22(u8);
93 pub const fn vendor_specific<const N: u8>() -> Self { in vendor_specific()
139 pub struct Mmd(u8);
145 pub const WIS: Self = Mmd(uapi::MDIO_MMD_WIS as u8);
147 pub const PCS: Self = Mmd(uapi::MDIO_MMD_PCS as u8);
149 pub const PHYXS: Self = Mmd(uapi::MDIO_MMD_PHYXS as u8);
151 pub const DTEXS: Self = Mmd(uapi::MDIO_MMD_DTEXS as u8);
153 pub const TC: Self = Mmd(uapi::MDIO_MMD_TC as u8);
155 pub const AN: Self = Mmd(uapi::MDIO_MMD_AN as u8);
171 pub const VEND1: Self = Mmd(uapi::MDIO_MMD_VEND1 as u8);
[all …]
/rust/kernel/
A Dprint.rs49 const fn generate(is_cont: bool, prefix: &[u8; 3]) -> [u8; LENGTH] { in generate()
59 let suffix: &[u8; LENGTH - LENGTH_PREFIX] = if is_cont {
77 pub static EMERG: [u8; LENGTH] = generate(false, bindings::KERN_EMERG);
78 pub static ALERT: [u8; LENGTH] = generate(false, bindings::KERN_ALERT);
79 pub static CRIT: [u8; LENGTH] = generate(false, bindings::KERN_CRIT);
80 pub static ERR: [u8; LENGTH] = generate(false, bindings::KERN_ERR);
83 pub static INFO: [u8; LENGTH] = generate(false, bindings::KERN_INFO);
84 pub static DEBUG: [u8; LENGTH] = generate(false, bindings::KERN_DEBUG);
85 pub static CONT: [u8; LENGTH] = generate(true, bindings::KERN_CONT);
101 format_string: &[u8; format_strings::LENGTH], in call_printk()
[all …]
A Dstr.rs13 pub struct BStr([u8]);
120 type Target = [u8];
136 [u8]: Index<Idx, Output = [u8]>,
145 impl AsRef<BStr> for [u8] { implementation
209 pub struct CStr([u8]);
317 pub fn to_bytes(&self) -> &[u8] { in to_bytes() argument
326 pub fn as_bytes(&self) -> &[u8] { in as_bytes() argument
674 for i in u8::MIN..=u8::MAX { in test_cstr_display_all_bytes()
759 pub(crate) unsafe fn from_ptrs(pos: *mut u8, end: *mut u8) -> Self { in from_ptrs() argument
789 self.pos as *mut u8 in pos()
[all …]
A Dalloc.rs156 fn alloc(layout: Layout, flags: Flags) -> Result<NonNull<[u8]>, AllocError> { in alloc() argument
195 ptr: Option<NonNull<u8>>, in realloc() argument
199 ) -> Result<NonNull<[u8]>, AllocError>; in realloc() argument
210 unsafe fn free(ptr: NonNull<u8>, layout: Layout) { in free() argument
219 pub(crate) fn dangling_from_layout(layout: Layout) -> NonNull<u8> { in dangling_from_layout() argument
220 let ptr = layout.align() as *mut u8; in dangling_from_layout()
A Duaccess.rs171 pub fn read_all<A: Allocator>(self, buf: &mut Vec<u8, A>, flags: Flags) -> Result { in read_all() argument
262 pub fn read_raw(&mut self, out: &mut [MaybeUninit<u8>]) -> Result { in read_raw()
283 pub fn read_slice(&mut self, out: &mut [u8]) -> Result { in read_slice()
286 let out = unsafe { &mut *(core::ptr::from_mut(out) as *mut [MaybeUninit<u8>]) }; in read_slice()
325 pub fn read_all<A: Allocator>(mut self, buf: &mut Vec<u8, A>, flags: Flags) -> Result { in read_all() argument
347 pub fn strcpy_into_buf<'buf>(self, buf: &'buf mut [u8]) -> Result<&'buf CStr> { in strcpy_into_buf()
354 let mut dst = unsafe { &mut *(core::ptr::from_mut(buf) as *mut [MaybeUninit<u8>]) }; in strcpy_into_buf()
424 pub fn write_slice(&mut self, data: &[u8]) -> Result { in write_slice()
485 fn raw_strncpy_from_user(dst: &mut [MaybeUninit<u8>], src: UserPtr) -> Result<usize> { in raw_strncpy_from_user() argument
A Dfirmware.rs101 pub fn data(&self) -> &[u8] { in data() argument
207 static __MODULE_FIRMWARE: [u8; $($builder)*::create(__MODULE_FIRMWARE_PREFIX)
227 buf: [u8; N],
242 const fn push_internal(mut self, bytes: &[u8]) -> Self { in push_internal()
320 pub const fn build(self) -> [u8; N] { in build()
A Dpage.rs104 fn with_page_mapped<T>(&self, f: impl FnOnce(*mut u8) -> T) -> T { in with_page_mapped()
149 f: impl FnOnce(*mut u8) -> Result<T>, in with_pointer_into_page()
174 pub unsafe fn read_raw(&self, dst: *mut u8, offset: usize, len: usize) -> Result { in read_raw() argument
196 pub unsafe fn write_raw(&self, src: *const u8, offset: usize, len: usize) -> Result { in write_raw() argument
A Dtransmute.rs26 u8, u16, u32, u64, usize,
61 u8, u16, u32, u64, usize,
A Dio.rs226 define_read!(read8, try_read8, readb -> u8);
236 define_read!(read8_relaxed, try_read8_relaxed, readb_relaxed -> u8);
246 define_write!(write8, try_write8, writeb <- u8);
256 define_write!(write8_relaxed, try_write8_relaxed, writeb_relaxed <- u8);
A Dbits.rs42 impl_bit_fn!(u8);
178 u8,
A Dbug.rs16 const _FILE: &[u8] = file!().as_bytes();
18 static FILE: [u8; _FILE.len() + 1] = {
A Dsecurity.rs52 pub fn as_bytes(&self) -> &[u8] { in as_bytes() argument
A Ddevice_id.rs203 static $module_table_name: [::core::mem::MaybeUninit<u8>; $table_name.raw_ids().size()] =
A Dconfigfs.rs564 let ret = O::show(data, unsafe { &mut *(page.cast::<[u8; PAGE_SIZE]>()) }); in show()
655 fn show(data: &Self::Data, page: &mut [u8; PAGE_SIZE]) -> Result<usize>; in show()
663 fn store(_data: &Self::Data, _page: &[u8]) -> Result { in store()
A Dlib.rs139 const __LOG_PREFIX: &[u8] = b"rust_kernel\0";
A Ddevice.rs258 unsafe fn printk(&self, klevel: &[u8], msg: fmt::Arguments<'_>) { in printk() argument
A Dopp.rs90 fn to_c_str_array(names: &[CString]) -> Result<KVec<*const u8>> { in to_c_str_array() argument
/rust/kernel/alloc/
A Dallocator.rs86 ptr: Option<NonNull<u8>>, in call() argument
90 ) -> Result<NonNull<[u8]>, AllocError> { in call() argument
133 ptr: Option<NonNull<u8>>, in realloc() argument
137 ) -> Result<NonNull<[u8]>, AllocError> { in realloc() argument
150 ptr: Option<NonNull<u8>>, in realloc() argument
154 ) -> Result<NonNull<[u8]>, AllocError> { in realloc() argument
174 ptr: Option<NonNull<u8>>, in realloc() argument
178 ) -> Result<NonNull<[u8]>, AllocError> { in realloc() argument
A Dallocator_test.rs39 ptr: Option<NonNull<u8>>, in realloc() argument
43 ) -> Result<NonNull<[u8]>, AllocError> { in realloc() argument
85 let dst = unsafe { libc_aligned_alloc(layout.align(), layout.size()) }.cast::<u8>(); in realloc()
/rust/kernel/block/mq/
A Draw_writer.rs14 buffer: &'a mut [u8],
20 fn new(buffer: &'a mut [u8]) -> Result<RawWriter<'a>> { in new()
33 unsafe { core::slice::from_raw_parts_mut(a.as_mut_ptr().cast::<u8>(), N) },
/rust/
A Dffi.rs28 c_char = u8;
31 c_uchar = u8;
/rust/helpers/
A Dio.c21 u8 rust_helper_readb(const void __iomem *addr) in rust_helper_readb()
43 void rust_helper_writeb(u8 value, void __iomem *addr) in rust_helper_writeb()
65 u8 rust_helper_readb_relaxed(const void __iomem *addr) in rust_helper_readb_relaxed()
87 void rust_helper_writeb_relaxed(u8 value, void __iomem *addr) in rust_helper_writeb_relaxed()
/rust/pin-init/examples/
A Dbig_struct_in_place.rs9 buf: [u8; 1024 * 1024 * 1024],
19 buf: [u8; 1024 * 1024],
/rust/kernel/net/
A Dphy.rs439 let ret = T::read_mmd(dev, devnum as u8, regnum)?; in read_mmd_callback()
458 T::write_mmd(dev, devnum as u8, regnum, val)?; in write_mmd_callback()
624 fn read_mmd(_dev: &mut Device, _devnum: u8, _regnum: u16) -> Result<u16> { in read_mmd() argument
629 fn write_mmd(_dev: &mut Device, _devnum: u8, _regnum: u16, _val: u16) -> Result { in write_mmd() argument
/rust/kernel/device/
A Dproperty.rs445 let mut str: *mut u8 = ptr::null_mut(); in read_from_fwnode_property()
564 u8: fwnode_property_read_u8_array,

Completed in 44 milliseconds

12