From: "Trevor Gross" <tmgross@umich.edu>
To: "Miguel Ojeda" <ojeda@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Danilo Krummrich" <dakr@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>
Cc: "Len Brown" <lenb@kernel.org>,
linux-acpi@vger.kernel.org, "Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
patches@lists.linux.dev
Subject: Re: [PATCH] rust: acpi: remove unneeded cast to clean future Clippy warning
Date: Tue, 01 Jul 2025 16:38:56 -0500 [thread overview]
Message-ID: <DB11L7KWH27S.8L9WLRAR1B0P@umich.edu> (raw)
In-Reply-To: <20250701174656.62205-1-ojeda@kernel.org>
On Tue Jul 1, 2025 at 12:46 PM CDT, Miguel Ojeda wrote:
> A future Clippy warning, `clippy::as_underscore`, is getting enabled in
> parallel in the rust-next tree:
>
> error: using `as _` conversion
> --> rust/kernel/acpi.rs:25:9
> |
> 25 | self.0.driver_data as _
> | ^^^^^^^^^^^^^^^^^^^^^^-
> | |
> | help: consider giving the type explicitly: `usize`
>
> The type is already `ulong`, which nowadays is always `usize`, so the
> cast is unneeded. Thus remove it, which in turn will avoid the warning
> in the future.
>
> Other abstractions of device tables do not use a cast here either.
>
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Reviewed-by: Trevor Gross <tmgross@umich.edu>
next prev parent reply other threads:[~2025-07-01 21:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-01 17:46 [PATCH] rust: acpi: remove unneeded cast to clean future Clippy warning Miguel Ojeda
2025-07-01 21:38 ` Trevor Gross [this message]
2025-07-07 12:49 ` 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=DB11L7KWH27S.8L9WLRAR1B0P@umich.edu \
--to=tmgross@umich.edu \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=gary@garyguo.net \
--cc=gregkh@linuxfoundation.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=patches@lists.linux.dev \
--cc=rafael@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
/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