[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250701053557.20859-6-work@onurozkan.dev>
Date: Tue, 1 Jul 2025 08:35:56 +0300
From: Onur Özkan <work@...rozkan.dev>
To: rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org,
linux-kselftest@...r.kernel.org,
kunit-dev@...glegroups.com
Cc: airlied@...il.com,
simona@...ll.ch,
ojeda@...nel.org,
alex.gaynor@...il.com,
boqun.feng@...il.com,
gary@...yguo.net,
bjorn3_gh@...tonmail.com,
lossin@...nel.org,
a.hindborg@...nel.org,
aliceryhl@...gle.com,
tmgross@...ch.edu,
rafael@...nel.org,
viresh.kumar@...aro.org,
gregkh@...uxfoundation.org,
maarten.lankhorst@...ux.intel.com,
mripard@...nel.org,
tzimmermann@...e.de,
davidgow@...gle.com,
nm@...com,
Onur Özkan <work@...rozkan.dev>
Subject: [PATCH v4 5/6] rust: remove `#[allow(clippy::unnecessary_cast)]`
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@...rozkan.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
Powered by blists - more mailing lists