Re: [PATCH v4 2/2] gpu: nova-core: use SizeConstants trait for u64 size constants
From: Alexandre Courbot
Date: Thu Apr 02 2026 - 11:00:32 EST
On Thu Apr 2, 2026 at 11:33 PM JST, Joel Fernandes wrote:
>
>
> On 4/1/2026 6:27 PM, John Hubbard wrote:
>> Replace manual usize-to-u64 conversions of SZ_* constants with the
>> SizeConstants trait's associated constants on u64. With the
>> SizeConstants trait in scope, u64::SZ_1M replaces usize_as_u64(SZ_1M)
>> and similar.
>>
>> This removes several now-unused imports: usize_as_u64, FromSafeCast,
>> and individual SZ_* type-level constants.
>>
>> Reviewed-by: Eliot Courtney <ecourtney@xxxxxxxxxx>
>> Signed-off-by: John Hubbard <jhubbard@xxxxxxxxxx>
>
> Reviewed-by: Joel Fernandes <joelagnelf@xxxxxxxxxx>
>
> I am very happy to see this series since I have these issues with mm
> patches quite a bit, which this series will resolve. Should I update the
> nova mm series to use these, or wait for it to be merged? The issue with
> updating the nova mm series is, then I'll have to either:
>
> a) carry the series as a dependency.
> b) wait for it to merge into drm-rust-next and rebase
>
> I could do a) and add a [REFERENCE] prefix to the patches, similar to how I
> did for some drm buddy bindings patches. Thoughts?
There is no need to carry the series into yours, just add a link to the
cover letter to your dependencies and folks can pick them up.
b4 also provides a dependency management mechanism, and will even fetch
them automatically if the people applying your series also use it.
I don't know which tree is going to pick this series, so whether we can
use it this cycle or not will depend on that. But if it lands in
`drm-rust-next`, then it's just a few weeks until you can drop the
dependency link from your cover letter anyway.