lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DB76B96DHB88.1ASN4O1SLKNAS@umich.edu>
Date: Tue, 08 Jul 2025 21:37:01 -0500
From: "Trevor Gross" <tmgross@...ch.edu>
To: Onur Özkan <work@...rozkan.dev>,
 <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>, <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>
Subject: Re: [PATCH v4 5/6] rust: remove
 `#[allow(clippy::unnecessary_cast)]`

On Tue Jul 1, 2025 at 12:35 AM CDT, Onur Özkan wrote:
> 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

Reviewed-by: Trevor Gross <tmgross@...ch.edu>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ