Alexandre Courbot
2025-Sep-03 07:10 UTC
[PATCH v3 02/11] gpu: nova-core: move GSP boot code out of `Gpu` constructor
On Wed Sep 3, 2025 at 8:12 AM JST, Danilo Krummrich wrote:> On 9/2/25 4:31 PM, Alexandre Courbot wrote: >> pub(crate) fn new( >> pdev: &pci::Device<device::Bound>, >> devres_bar: Arc<Devres<Bar0>>, > > The diff is hiding it, but with this patch we should also make sure that this > returns impl PinInit<Self, Error> rather than Result<impl PinInit<Self>. > > I think this should be possible now.There is still code that can return errors (falcon creation, etc) - do you mean that we should move it into the pin initializer and turn it into a `try_pin_init`?
Danilo Krummrich
2025-Sep-03 08:27 UTC
[PATCH v3 02/11] gpu: nova-core: move GSP boot code out of `Gpu` constructor
On Wed Sep 3, 2025 at 9:10 AM CEST, Alexandre Courbot wrote:> On Wed Sep 3, 2025 at 8:12 AM JST, Danilo Krummrich wrote: >> On 9/2/25 4:31 PM, Alexandre Courbot wrote: >>> pub(crate) fn new( >>> pdev: &pci::Device<device::Bound>, >>> devres_bar: Arc<Devres<Bar0>>, >> >> The diff is hiding it, but with this patch we should also make sure that this >> returns impl PinInit<Self, Error> rather than Result<impl PinInit<Self>. >> >> I think this should be possible now. > > There is still code that can return errors (falcon creation, etc) - do > you mean that we should move it into the pin initializer and turn it > into a `try_pin_init`?Yeah, that would be better practice, if it doesn't work out for a good reason we can also fall back to Result<impl PinInit<Self, Error>, but we should at least try to avoid it.