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] [day] [month] [year] [list]
Message-ID: <CAH5fLgjkDJXq6jGL7SuoyaBr6TWWcRgev9=1mT+soSK4SJBRaw@mail.gmail.com>
Date: Tue, 15 Oct 2024 19:17:07 +0200
From: Alice Ryhl <aliceryhl@...gle.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Arnd Bergmann <arnd@...db.de>, 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 <benno.lossin@...ton.me>, Andreas Hindborg <a.hindborg@...nel.org>, 
	Trevor Gross <tmgross@...ch.edu>, rust-for-linux@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rust: miscdevice: fix warning on c_uint to u32 cast

On Tue, Oct 15, 2024 at 7:08 PM Greg Kroah-Hartman
<gregkh@...uxfoundation.org> wrote:
>
> On Tue, Oct 15, 2024 at 02:13:22PM +0000, Alice Ryhl wrote:
> > When building miscdevice with clippy warnings, the following warning is
> > emitted:
> >
> >       warning: casting to the same type is unnecessary (`u32` -> `u32`)
> >          --> /home/aliceryhl/rust-for-linux/rust/kernel/miscdevice.rs:220:28
> >           |
> >       220 |     match T::ioctl(device, cmd as u32, arg as usize) {
> >           |                            ^^^^^^^^^^ help: try: `cmd`
> >           |
> >           = help: for further information visit
> >             https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
> >           = note: `-W clippy::unnecessary-cast` implied by `-W clippy::all`
> >           = help: to override `-W clippy::all` add `#[allow(clippy::unnecessary_cast)]`
> >
> > Thus, fix it.
> >
> > Signed-off-by: Alice Ryhl <aliceryhl@...gle.com>
> > ---
> > This fixes a warning on my patches in char-misc-next. Greg, can you take
> > this through that tree?
>
> Will do, thanks!

Awesome, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ