From: John Hubbard <jhubbard@nvidia.com>
To: Danilo Krummrich <dakr@kernel.org>,
acourbot@nvidia.com, ojeda@kernel.org, alex.gaynor@gmail.com,
boqun.feng@gmail.com, gary@garyguo.net, bjorn3_gh@protonmail.com,
lossin@kernel.org, a.hindborg@kernel.org, aliceryhl@google.com,
tmgross@umich.edu
Cc: nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
rust-for-linux@vger.kernel.org
Subject: Re: [PATCH 1/2] gpu: nova-core: gsp: remove useless conversion
Date: Fri, 26 Sep 2025 17:30:40 -0700 [thread overview]
Message-ID: <d2003100-82df-4c72-b6f8-0d995c82a9f0@nvidia.com> (raw)
In-Reply-To: <20250926130623.61316-1-dakr@kernel.org>
On 9/26/25 6:05 AM, Danilo Krummrich wrote:
> Meanwhile nova-core depends on CONFIG_64BIT and a raw DmaAddress is
> always a u64, hence remove the now actually useless conversion.
>
Because I'm already here and have at least mild OCD, I'll suggest
saying it like this:
"Because nova-core depends on CONFIG_64BIT and a raw DmaAddress is
always a u64, we can remove the now actually useless conversion."
> Signed-off-by: Danilo Krummrich <dakr@kernel.org>
> ---
> drivers/gpu/nova-core/firmware/gsp.rs | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Either way, it's clearly correct, so:
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
thanks,
John Hubbard
>
> diff --git a/drivers/gpu/nova-core/firmware/gsp.rs b/drivers/gpu/nova-core/firmware/gsp.rs
> index 9b70095434c6..ca785860e1c8 100644
> --- a/drivers/gpu/nova-core/firmware/gsp.rs
> +++ b/drivers/gpu/nova-core/firmware/gsp.rs
> @@ -202,8 +202,7 @@ pub(crate) fn new<'a, 'b>(
> let mut level0_data = kvec![0u8; GSP_PAGE_SIZE]?;
>
> // Fill level 1 page entry.
> - #[allow(clippy::useless_conversion)]
> - let level1_entry = u64::from(level1.iter().next().unwrap().dma_address());
> + let level1_entry = level1.iter().next().unwrap().dma_address();
> let dst = &mut level0_data[..size_of_val(&level1_entry)];
> dst.copy_from_slice(&level1_entry.to_le_bytes());
>
>
> base-commit: 299eb32863e584cfff7c6b667c3e92ae7d4d2bf9
next prev parent reply other threads:[~2025-09-27 0:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-26 13:05 [PATCH 1/2] gpu: nova-core: gsp: remove useless conversion Danilo Krummrich
2025-09-26 13:05 ` [PATCH 2/2] gpu: nova-core: gsp: do not unwrap() SGEntry Danilo Krummrich
2025-09-27 0:32 ` John Hubbard
2025-09-27 0:30 ` John Hubbard [this message]
2025-09-29 4:18 ` [PATCH 1/2] gpu: nova-core: gsp: remove useless conversion Alexandre Courbot
2025-10-15 23:20 ` Alexandre Courbot
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=d2003100-82df-4c72-b6f8-0d995c82a9f0@nvidia.com \
--to=jhubbard@nvidia.com \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gary@garyguo.net \
--cc=lossin@kernel.org \
--cc=nouveau@lists.freedesktop.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