This isn't needed anymore since `kernel::ffi::c_int` type is always `i32` which differs from `err` (isize).
Signed-off-by: Onur Özkan work@onurozkan.dev --- rust/kernel/error.rs | 1 - 1 file changed, 1 deletion(-)
diff --git a/rust/kernel/error.rs b/rust/kernel/error.rs index a59613918d4c..05c6e71c0afb 100644 --- a/rust/kernel/error.rs +++ b/rust/kernel/error.rs @@ -413,7 +413,6 @@ pub fn from_err_ptr<T>(ptr: *mut T) -> Result<*mut T> { // SAFETY: The FFI function does not deref the pointer. let err = unsafe { bindings::PTR_ERR(const_ptr) };
- #[allow(clippy::unnecessary_cast)] // CAST: If `IS_ERR()` returns `true`, // then `PTR_ERR()` is guaranteed to return a // negative value greater-or-equal to `-bindings::MAX_ERRNO`, -- 2.50.0