Home
last modified time | relevance | path

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

123

/rust/kernel/
A Dregulator.rs22 error::{from_err_ptr, to_result, Result},
267 pub fn get_voltage(&self) -> Result<Voltage> { in get_voltage()
277 fn get_internal(dev: &Device, name: &CStr) -> Result<Regulator<T>> { in get_internal()
292 fn enable_internal(&mut self) -> Result { in enable_internal() argument
297 fn disable_internal(&mut self) -> Result { in disable_internal() argument
305 pub fn get(dev: &Device, name: &CStr) -> Result<Self> { in get()
310 pub fn try_into_enabled(self) -> Result<Regulator<Enabled>, Error<Disabled>> { in try_into_enabled()
332 pub fn get(dev: &Device, name: &CStr) -> Result<Self> { in get()
364 pub fn get(dev: &Device, name: &CStr) -> Result<Self> { in get()
369 pub fn enable(&mut self) -> Result { in enable() argument
[all …]
A Ddma.rs10 error::{to_result, Result},
31 unsafe fn dma_set_mask(&self, mask: DmaMask) -> Result { in dma_set_mask() argument
48 unsafe fn dma_set_coherent_mask(&self, mask: DmaMask) -> Result { in dma_set_coherent_mask() argument
143 pub const fn try_new(n: u32) -> Result<Self> { in try_new()
303 ) -> Result<CoherentAllocation<T>> { in alloc_attrs()
347 ) -> Result<CoherentAllocation<T>> { in alloc_coherent()
594 (|| -> ::core::result::Result<_, $crate::error::Error> {
601 ::core::result::Result::Ok(
644 (|| -> ::core::result::Result<_, $crate::error::Error> {
648 ::core::result::Result::Ok(())
[all …]
A Dpage.rs9 error::Result,
73 pub fn alloc_page(flags: Flags) -> Result<Self, AllocError> { in alloc_page()
149 f: impl FnOnce(*mut u8) -> Result<T>, in with_pointer_into_page()
150 ) -> 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
216 pub unsafe fn fill_zero_raw(&self, offset: usize, len: usize) -> Result { in fill_zero_raw() argument
244 ) -> Result { in copy_from_user_slice_raw() argument
A Dopp.rs39 pub(crate) fn new(table: &Table) -> Result<Self> { in new()
307 ) -> Result { in config_regulators() argument
639 pub fn from_dev(dev: &Device) -> Result<Self> { in from_dev()
712 pub fn opp_count(&self) -> Result<u32> { in opp_count()
757 pub fn sync_regulators(&self) -> Result { in sync_regulators() argument
806 ) -> Result { in adjust_voltage() argument
829 pub fn set_rate(&self, freq: Hertz) -> Result { in set_rate() argument
837 pub fn set_opp(&self, opp: &OPP) -> Result { in set_opp() argument
850 ) -> Result<ARef<OPP>> { in opp_from_freq()
941 pub fn enable_opp(&self, freq: Hertz) -> Result { in enable_opp() argument
[all …]
A Dclk.rs84 error::{from_err_ptr, to_result, Result},
138 pub fn get(dev: &Device, name: Option<&CStr>) -> Result<Self> { in get()
161 pub fn enable(&self) -> Result { in enable() argument
185 pub fn prepare(&self) -> Result { in prepare() argument
207 pub fn prepare_enable(&self) -> Result { in prepare_enable() argument
241 pub fn set_rate(&self, rate: Hertz) -> Result { in set_rate() argument
306 pub fn get(dev: &Device, name: Option<&CStr>) -> Result<Self> { in get()
A Dstr.rs67 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { in fmt() argument
631 fn test_cstr_to_str() -> Result { in test_cstr_to_str()
640 fn test_cstr_to_str_invalid_utf8() -> Result { in test_cstr_to_str_invalid_utf8()
648 fn test_cstr_as_str_unchecked() -> Result { in test_cstr_as_str_unchecked()
658 fn test_cstr_display() -> Result { in test_cstr_display()
671 fn test_cstr_display_all_bytes() -> Result { in test_cstr_display_all_bytes()
683 fn test_cstr_debug() -> Result { in test_cstr_debug()
696 fn test_bstr_display() -> Result { in test_bstr_display()
711 fn test_bstr_debug() -> Result { in test_bstr_debug()
799 fn write_str(&mut self, s: &str) -> fmt::Result { in write_str() argument
[all …]
A Duaccess.rs10 error::Result,
171 pub fn read_all<A: Allocator>(self, buf: &mut Vec<u8, A>, flags: Flags) -> Result { in read_all() argument
220 pub fn skip(&mut self, num_skip: usize) -> Result { in skip() argument
262 pub fn read_raw(&mut self, out: &mut [MaybeUninit<u8>]) -> Result { in read_raw() argument
283 pub fn read_slice(&mut self, out: &mut [u8]) -> Result { in read_slice() argument
294 pub fn read<T: FromBytes>(&mut self) -> Result<T> { in read()
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()
424 pub fn write_slice(&mut self, data: &[u8]) -> Result { in write_slice() argument
446 pub fn write<T: AsBytes>(&mut self, value: &T) -> Result { in write() argument
[all …]
A Dcpufreq.rs91 fn new(val: u32) -> Result<Self> { in new()
158 pub fn generic_verify(&self) -> Result { in generic_verify() argument
528 pub fn generic_get(&self) -> Result<u32> { in generic_get()
612 pub fn freq_table(&self) -> Result<&Table> { in freq_table()
683 fn from_cpu(cpu: CpuId) -> Result<Self> { in from_cpu()
747 fn online(_policy: &mut Policy) -> Result { in online() argument
752 fn offline(_policy: &mut Policy) -> Result { in offline() argument
757 fn suspend(_policy: &mut Policy) -> Result { in suspend() argument
762 fn resume(_policy: &mut Policy) -> Result { in resume() argument
772 fn verify(data: &mut PolicyData) -> Result; in verify() argument
[all …]
A Dinit.rs147 fn try_pin_init<E>(init: impl PinInit<T, E>, flags: Flags) -> Result<Self::PinnedSelf, E> in try_pin_init()
155 fn pin_init<E>(init: impl PinInit<T, E>, flags: Flags) -> error::Result<Self::PinnedSelf> in pin_init()
167 fn try_init<E>(init: impl Init<T, E>, flags: Flags) -> Result<Self, E> in try_init()
172 fn init<E>(init: impl Init<T, E>, flags: Flags) -> error::Result<Self> in init()
A Dsecurity.rs11 error::{to_result, Result},
27 pub fn from_secid(secid: u32) -> Result<Self> { in from_secid()
A Dio.rs7 use crate::error::{code::EINVAL, Result};
30 pub fn new(addr: usize, maxsize: usize) -> Result<Self> { in new()
135 pub fn $try_name(&self, offset: usize) -> Result<$type_name> {
164 pub fn $try_name(&self, value: $type_name, offset: usize) -> Result {
209 fn io_addr<U>(&self, offset: usize) -> Result<usize> { in io_addr()
A Derror.rs185 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { in fmt() argument
376 pub type Result<T = (), E = Error> = core::result::Result<T, E>; typedef
380 pub fn to_result(err: crate::ffi::c_int) -> Result { in to_result() argument
409 pub fn from_err_ptr<T>(ptr: *mut T) -> Result<*mut T> { in from_err_ptr()
458 F: FnOnce() -> Result<T>, in from_result()
A Dfirmware.rs7 use crate::{bindings, device::Device, error::Error, error::Result, ffi, str::CStr};
62 fn request_internal(name: &CStr, dev: &Device, func: FwFunc) -> Result<Self> { in request_internal()
80 pub fn request(name: &CStr, dev: &Device) -> Result<Self> { in request()
86 pub fn request_nowarn(name: &CStr, dev: &Device) -> Result<Self> { in request_nowarn()
/rust/pin-init/src/
A Dalloc.rs30 fn try_pin_init<E>(init: impl PinInit<T, E>) -> Result<Pin<Self>, E> in try_pin_init()
38 fn pin_init(init: impl PinInit<T>) -> Result<Pin<Self>, AllocError> { in pin_init()
50 fn try_init<E>(init: impl Init<T, E>) -> Result<Self, E> in try_init()
55 fn init(init: impl Init<T>) -> Result<Self, AllocError> { in init()
82 fn try_pin_init<E>(init: impl PinInit<T, E>) -> Result<Pin<Self>, E> in try_pin_init()
90 fn try_init<E>(init: impl Init<T, E>) -> Result<Self, E> in try_init()
100 fn try_pin_init<E>(init: impl PinInit<T, E>) -> Result<Pin<Self>, E> in try_pin_init()
118 fn try_init<E>(init: impl Init<T, E>) -> Result<Self, E> in try_init()
139 fn write_init<E>(mut self, init: impl Init<T, E>) -> Result<Self::Initialized, E> { in write_init()
148 fn write_pin_init<E>(mut self, init: impl PinInit<T, E>) -> Result<Pin<Self::Initialized>, E> { in write_pin_init()
A D__internal.rs29 F: FnOnce(*mut T) -> Result<(), E>,
32 unsafe fn __init(self, slot: *mut T) -> Result<(), E> { in __init() argument
41 F: FnOnce(*mut T) -> Result<(), E>,
44 unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), E> { in __pinned_init() argument
73 F: FnOnce(*mut Self::Datee) -> Result<O, E>, in make_closure()
103 F: FnOnce(*mut Self::Datee) -> Result<O, E>, in make_closure()
171 pub fn init<E>(self: Pin<&mut Self>, init: impl PinInit<T, E>) -> Result<Pin<&mut T>, E> { in init()
202 let value: Result<Pin<&mut Foo>, core::convert::Infallible> = in stack_init_reuse()
209 let value: Result<Pin<&mut Foo>, core::convert::Infallible> = in stack_init_reuse()
290 unsafe fn __pinned_init(self, _slot: *mut T) -> Result<(), ()> { in __pinned_init() argument
A Dlib.rs1086 F: FnOnce(Pin<&mut T>) -> Result<(), E>, in pin_chain() argument
1102 F: FnOnce(Pin<&mut T>) -> Result<(), E>,
1162 unsafe fn __init(self, slot: *mut T) -> Result<(), E>; in __init() argument
1194 F: FnOnce(&mut T) -> Result<(), E>, in chain() argument
1209 F: FnOnce(&mut T) -> Result<(), E>,
1211 unsafe fn __init(self, slot: *mut T) -> Result<(), E> { in __init() argument
1225 F: FnOnce(&mut T) -> Result<(), E>,
1247 f: impl FnOnce(*mut T) -> Result<(), E>, in pin_init_from_closure() argument
1266 f: impl FnOnce(*mut T) -> Result<(), E>, in init_from_closure() argument
1415 unsafe impl<T, E> Init<T, E> for Result<T, E> { implementation
[all …]
/rust/kernel/block/mq/
A Draw_writer.rs5 use crate::error::Result;
20 fn new(buffer: &'a mut [u8]) -> Result<RawWriter<'a>> { in new()
29 ) -> Result<RawWriter<'a>> {
39 fn write_str(&mut self, s: &str) -> fmt::Result { in write_str() argument
A Dgen_disk.rs9 use crate::{bindings, error::from_err_ptr, error::Result, sync::Arc};
48 fn validate_block_size(size: u32) -> Result { in validate_block_size() argument
63 pub fn logical_block_size(mut self, block_size: u32) -> Result<Self> { in logical_block_size()
78 pub fn physical_block_size(mut self, block_size: u32) -> Result<Self> { in physical_block_size()
95 ) -> Result<GenDisk<T>> { in build()
/rust/kernel/net/phy/
A Dreg.rs45 fn read(&self, dev: &mut Device) -> Result<u16>; in read()
48 fn write(&self, dev: &mut Device, val: u16) -> Result; in write() argument
51 fn read_status(dev: &mut Device) -> Result<u16>; in read_status()
105 fn read(&self, dev: &mut Device) -> Result<u16> { in read()
117 fn write(&self, dev: &mut Device, val: u16) -> Result { in write() argument
127 fn read_status(dev: &mut Device) -> Result<u16> { in read_status()
197 fn read(&self, dev: &mut Device) -> Result<u16> { in read()
207 fn write(&self, dev: &mut Device, val: u16) -> Result { in write() argument
216 fn read_status(dev: &mut Device) -> Result<u16> { in read_status()
/rust/kernel/device/
A Dproperty.rs13 error::{to_result, Result},
80 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { in display_name() argument
133 ) -> Result<PropertyGuard<'fwnode, 'name, KVec<T>>> { in property_read_array_vec()
263 ) -> Result<FwNodeReferenceArgs> { in property_get_reference_args()
355 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { in fmt() argument
381 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { in fmt() argument
438 fn read_from_fwnode_property(fwnode: &FwNode, name: &CStr) -> Result<Self>; in read_from_fwnode_property()
480 ) -> Result<&'a mut [Self]>; in read_array_from_fwnode_property()
500 ) -> Result<&'a mut [Self]> {
582 inner: Result<T>,
[all …]
/rust/kernel/net/
A Dphy.rs223 pub fn init_hw(&mut self) -> Result { in init_hw() argument
231 pub fn start_aneg(&mut self) -> Result { in start_aneg() argument
239 pub fn genphy_resume(&mut self) -> Result { in genphy_resume() argument
247 pub fn genphy_suspend(&mut self) -> Result { in genphy_suspend() argument
268 pub fn genphy_read_lpa(&mut self) -> Result { in genphy_read_lpa() argument
582 fn soft_reset(_dev: &mut Device) -> Result { in soft_reset() argument
587 fn probe(_dev: &mut Device) -> Result { in probe() argument
604 fn config_aneg(_dev: &mut Device) -> Result { in config_aneg() argument
614 fn suspend(_dev: &mut Device) -> Result { in suspend() argument
619 fn resume(_dev: &mut Device) -> Result { in resume() argument
[all …]
/rust/kernel/alloc/kvec/
A Derrors.rs12 fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { in fmt() argument
29 fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { in fmt() argument
49 fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { in fmt() argument
/rust/kernel/alloc/
A Dallocator.rs90 ) -> Result<NonNull<[u8]>, AllocError> { in call()
137 ) -> Result<NonNull<[u8]>, AllocError> { in realloc()
154 ) -> Result<NonNull<[u8]>, AllocError> { in realloc()
178 ) -> Result<NonNull<[u8]>, AllocError> { in realloc()
A Dkbox.rs17 use core::result::Result;
255 pub fn new(x: T, flags: Flags) -> Result<Self, AllocError> { in new()
274 pub fn new_uninit(flags: Flags) -> Result<Box<MaybeUninit<T>, A>, AllocError> { in new_uninit()
286 pub fn pin(x: T, flags: Flags) -> Result<Pin<Box<T, A>>, AllocError> in pin()
361 fn write_init<E>(mut self, init: impl Init<T, E>) -> Result<Self::Initialized, E> { in write_init()
370 fn write_pin_init<E>(mut self, init: impl PinInit<T, E>) -> Result<Pin<Self::Initialized>, E> { in write_pin_init()
387 fn try_pin_init<E>(init: impl PinInit<T, E>, flags: Flags) -> Result<Pin<Self>, E> in try_pin_init()
395 fn try_init<E>(init: impl Init<T, E>, flags: Flags) -> Result<Self, E> in try_init()
569 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { in fmt() argument
579 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { in fmt() argument
/rust/kernel/sync/
A Darc.rs219 fn try_init<E>(init: impl Init<T, E>, flags: Flags) -> Result<Self, E> in try_init()
229 pub fn new(contents: T, flags: Flags) -> Result<Self, AllocError> { in new()
734 fn try_init<E>(init: impl Init<T, E>, flags: Flags) -> Result<Self, E> in try_init()
745 fn write_init<E>(mut self, init: impl Init<T, E>) -> Result<Self::Initialized, E> { in write_init()
766 pub fn new(value: T, flags: Flags) -> Result<Self, AllocError> { in new()
774 pub fn new_uninit(flags: Flags) -> Result<UniqueArc<MaybeUninit<T>>, AllocError> { in new_uninit()
829 ) -> core::result::Result<Pin<UniqueArc<T>>, E> { in pin_init_with()
916 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { in fmt() argument
922 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { in fmt() argument
928 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { in fmt() argument
[all …]

Completed in 53 milliseconds

123