@@ -95,7 +95,7 @@ impl Error {
95
95
///
96
96
/// It is a bug to pass an out-of-range `errno`. `EINVAL` would
97
97
/// be returned in such a case.
98
- pub ( crate ) fn from_errno ( errno : core:: ffi:: c_int ) -> Error {
98
+ pub fn from_errno ( errno : core:: ffi:: c_int ) -> Error {
99
99
if errno < -( bindings:: MAX_ERRNO as i32 ) || errno >= 0 {
100
100
// TODO: Make it a `WARN_ONCE` once available.
101
101
crate :: pr_warn!(
@@ -133,8 +133,7 @@ impl Error {
133
133
}
134
134
135
135
/// Returns the error encoded as a pointer.
136
- #[ expect( dead_code) ]
137
- pub ( crate ) fn to_ptr < T > ( self ) -> * mut T {
136
+ pub fn to_ptr < T > ( self ) -> * mut T {
138
137
#[ cfg_attr( target_pointer_width = "32" , allow( clippy:: useless_conversion) ) ]
139
138
// SAFETY: `self.0` is a valid error due to its invariant.
140
139
unsafe {
@@ -270,9 +269,7 @@ pub fn to_result(err: core::ffi::c_int) -> Result {
270
269
/// from_err_ptr(unsafe { bindings::devm_platform_ioremap_resource(pdev.to_ptr(), index) })
271
270
/// }
272
271
/// ```
273
- // TODO: Remove `dead_code` marker once an in-kernel client is available.
274
- #[ allow( dead_code) ]
275
- pub ( crate ) fn from_err_ptr < T > ( ptr : * mut T ) -> Result < * mut T > {
272
+ pub fn from_err_ptr < T > ( ptr : * mut T ) -> Result < * mut T > {
276
273
// CAST: Casting a pointer to `*const core::ffi::c_void` is always valid.
277
274
let const_ptr: * const core:: ffi:: c_void = ptr. cast ( ) ;
278
275
// SAFETY: The FFI function does not deref the pointer.
@@ -318,9 +315,7 @@ pub(crate) fn from_err_ptr<T>(ptr: *mut T) -> Result<*mut T> {
318
315
/// })
319
316
/// }
320
317
/// ```
321
- // TODO: Remove `dead_code` marker once an in-kernel client is available.
322
- #[ allow( dead_code) ]
323
- pub ( crate ) fn from_result < T , F > ( f : F ) -> T
318
+ pub fn from_result < T , F > ( f : F ) -> T
324
319
where
325
320
T : From < i16 > ,
326
321
F : FnOnce ( ) -> Result < T > ,
0 commit comments