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: <CAJ-ks9m837aTYsS9Qd8bC0_abE_GT9TZUDZbbPnpyOtgrF9Ehw@mail.gmail.com>
Date: Wed, 11 Jun 2025 09:30:46 -0400
From: Tamir Duberstein <tamird@...il.com>
To: Alice Ryhl <aliceryhl@...gle.com>
Cc: FUJITA Tomonori <fujita.tomonori@...il.com>, Trevor Gross <tmgross@...ch.edu>, 
	Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>, 
	Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>, 
	Björn Roy Baron <bjorn3_gh@...tonmail.com>, 
	Benno Lossin <lossin@...nel.org>, Andreas Hindborg <a.hindborg@...nel.org>, 
	Danilo Krummrich <dakr@...nel.org>, "David S. Miller" <davem@...emloft.net>, Andrew Lunn <andrew@...n.ch>, 
	netdev@...r.kernel.org, rust-for-linux@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rust: cast to the proper type

On Wed, Jun 11, 2025 at 7:42 AM Alice Ryhl <aliceryhl@...gle.com> wrote:
>
> On Wed, Jun 11, 2025 at 12:28 PM Tamir Duberstein <tamird@...il.com> wrote:
> >
> > Use the ffi type rather than the resolved underlying type.
> >
> > Fixes: f20fd5449ada ("rust: core abstractions for network PHY drivers")
>
> Does this need to be backported? If not, I wouldn't include a Fixes tag.

I'm fine with omitting it. I wanted to leave a breadcrumb to the
commit that introduced the current code.

>
> > +            DuplexMode::Full => bindings::DUPLEX_FULL,
> > +            DuplexMode::Half => bindings::DUPLEX_HALF,
> > +            DuplexMode::Unknown => bindings::DUPLEX_UNKNOWN,
> > +        } as crate::ffi::c_int;
>
> This file imports the prelude, so this can just be c_int without the
> crate::ffI:: path.

This has come up a few times now; should we consider denying
unused_qualifications?

https://doc.rust-lang.org/stable/nightly-rustc/rustc_lint/builtin/static.UNUSED_QUALIFICATIONS.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ