Thread (32 messages) 32 messages, 8 authors, 2025-06-22

Re: [PATCH v12 4/6] rust: enable `clippy::as_underscore` lint

From: Danilo Krummrich <dakr@kernel.org>
Date: 2025-06-18 17:38:06
Also in: dri-devel, linux-block, linux-devicetree, linux-kbuild, linux-kselftest, linux-mm, linux-pci, linux-pm, lkml, nouveau, rust-for-linux

On 6/15/25 10:55 PM, Tamir Duberstein wrote:
quoted hunk ↗ jump to hunk
diff --git a/rust/kernel/error.rs b/rust/kernel/error.rs
index afcb00cb6a75..fd7a8b759437 100644
--- a/rust/kernel/error.rs
+++ b/rust/kernel/error.rs
@@ -153,7 +153,7 @@ pub(crate) fn to_blk_status(self) -> bindings::blk_status_t {
      /// Returns the error encoded as a pointer.
      pub fn to_ptr<T>(self) -> *mut T {
          // SAFETY: `self.0` is a valid error due to its invariant.
-        unsafe { bindings::ERR_PTR(self.0.get() as _).cast() }
+        unsafe { bindings::ERR_PTR(self.0.get() as isize).cast() }
Shouldn't this be `c_long`?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help