[PATCH v12 4/6] rust: enable `clippy::as_underscore` lint
Danilo Krummrich
dakr at kernel.org
Wed Jun 18 17:37:54 UTC 2025
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`?
More information about the Nouveau
mailing list