Danilo Krummrich
2025-Oct-20 10:13 UTC
[PATCH v5 03/14] gpu: nova-core: gsp: Create wpr metadata
On Mon Oct 20, 2025 at 7:40 AM CEST, Alexandre Courbot wrote:> The alternative would be to have const functions like `usize_to_u64`. It > doesn't look as smooth as the extention trait, but can be used in const > contexts.That's what I thought of, exactly for the reason of being usable in const contexts (at least for a quick fix in nova-core). Whether we want an extention trait and a separate temporary const_usize_to_u64() etc. can be discussed in the context of making it common infrastructure.
Alexandre Courbot
2025-Oct-20 10:50 UTC
[PATCH v5 03/14] gpu: nova-core: gsp: Create wpr metadata
On Mon Oct 20, 2025 at 7:13 PM JST, Danilo Krummrich wrote:> On Mon Oct 20, 2025 at 7:40 AM CEST, Alexandre Courbot wrote: >> The alternative would be to have const functions like `usize_to_u64`. It >> doesn't look as smooth as the extention trait, but can be used in const >> contexts. > > That's what I thought of, exactly for the reason of being usable in const > contexts (at least for a quick fix in nova-core). > > Whether we want an extention trait and a separate temporary const_usize_to_u64() > etc. can be discussed in the context of making it common infrastructure.Thanks - so IIUC the idea would be to keep this local to nova-core in a first time? If so I guess I can produce this fast (and convert our many uses of `as` in the driver so far).