[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1117b9e5-b46a-4661-bfe9-56ff844c1218@kernel.org>
Date: Fri, 15 Aug 2025 23:19:03 +0200
From: Danilo Krummrich <dakr@...nel.org>
To: Miguel Ojeda <ojeda@...nel.org>
Cc: David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Alex Gaynor <alex.gaynor@...il.com>, nouveau@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org, 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>, Alice Ryhl <aliceryhl@...gle.com>,
Trevor Gross <tmgross@...ch.edu>, rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org, patches@...ts.linux.dev
Subject: Re: [PATCH] drm: nova-drm: fix 32-bit arm build
On 7/24/25 6:54 PM, Miguel Ojeda wrote:
> In 32-bit arm, the build fails with:
>
> error[E0308]: mismatched types
> --> drivers/gpu/drm/nova/file.rs:42:28
> |
> 42 | getparam.set_value(value);
> | --------- ^^^^^ expected `u64`, found `u32`
> | |
> | arguments to this method are incorrect
> |
> note: method defined here
> --> drivers/gpu/drm/nova/uapi.rs:29:12
> |
> 29 | pub fn set_value(&self, v: u64) {
> | ^^^^^^^^^ ------
> help: you can convert a `u32` to a `u64`
> |
> 42 | getparam.set_value(value.into());
> | +++++++
>
> The reason is that `Getparam::set_value` takes a `u64` (from the UAPI),
> but `pci::Device::resource_len()` returns a `resource_size_t`, which is a
> `phys_addr_t`, which may be 32- or 64-bit.
>
> Thus add an `into()` call to support the 32-bit case, while allowing the
> Clippy lint that complains in the 64-bit case where the type is the same.
>
> Fixes: cdeaeb9dd762 ("drm: nova-drm: add initial driver skeleton")
> Signed-off-by: Miguel Ojeda <ojeda@...nel.org>
Applied to drm-misc-fixes, thanks!
Powered by blists - more mailing lists