Danilo Krummrich
2025-Jun-18 17:37 UTC
[PATCH v12 4/6] rust: enable `clippy::as_underscore` lint
On 6/15/25 10:55 PM, Tamir Duberstein wrote:> 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`?
Miguel Ojeda
2025-Jun-18 17:50 UTC
[PATCH v12 4/6] rust: enable `clippy::as_underscore` lint
On Wed, Jun 18, 2025 at 7:38?PM Danilo Krummrich <dakr at kernel.org> wrote:> > Shouldn't this be `c_long`?Yeah, agreed, it is clearer -- I mentioned that for similar ones in a previous version. Cheers, Miguel
Tamir Duberstein
2025-Jun-18 17:56 UTC
[PATCH v12 4/6] rust: enable `clippy::as_underscore` lint
On Wed, Jun 18, 2025 at 1:50?PM Miguel Ojeda <miguel.ojeda.sandonis at gmail.com> wrote:> > On Wed, Jun 18, 2025 at 7:38?PM Danilo Krummrich <dakr at kernel.org> wrote: > > > > Shouldn't this be `c_long`? > > Yeah, agreed, it is clearer -- I mentioned that for similar ones in a > previous version.+1 Miguel, would you mind taking care of this on apply? Quite a big series to send again. Cheers. Tamir