From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Alice Ryhl <aliceryhl@google.com>
Cc: "Arnd Bergmann" <arnd@arndb.de>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <benno.lossin@proton.me>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rust: miscdevice: fix warning on c_uint to u32 cast
Date: Tue, 15 Oct 2024 19:08:53 +0200 [thread overview]
Message-ID: <2024101545-reentry-extenuate-58ce@gregkh> (raw)
In-Reply-To: <20241015-miscdevice-cint-cast-v1-1-fcf4b75700ac@google.com>
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@google.com>
> ---
> This fixes a warning on my patches in char-misc-next. Greg, can you take
> this through that tree?
Will do, thanks!
greg k-h
next prev parent reply other threads:[~2024-10-15 17:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-15 14:13 [PATCH] rust: miscdevice: fix warning on c_uint to u32 cast Alice Ryhl
2024-10-15 17:08 ` Greg Kroah-Hartman [this message]
2024-10-15 17:17 ` Alice Ryhl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2024101545-reentry-extenuate-58ce@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=arnd@arndb.de \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).