On 11/26/26 12:11, Laura Nao wrote:
>
> Makes sense, thanks for the pointer. I this this also means 
> job_irq_init needs to return Result<impl PinInit<Self, Error> + 'a>
> instead of a fully constructed Result<Pin<KBox<TyrIrqRegistration<'a, 
> JobIrq>>>>,
> right?
>
> With [0], Firmware is no longer wrapped in Arc. Iiuic, combined with the
> above, this will let us embed both the firmware and the job IRQ 
> registration as plain #[pin] fields in the same TyrDrmRegistrationData 
> struct. The job IRQ can then borrow a reference to the firmware's 
> JobIrqEvents directly within that same struct, instead of cloning it
> through Arc.
>
> If that's correct, I'll change both job_irq_init() and 
> TyrIrqRegistration::request() to return a 
> Result<impl PinInit<Self, Error> + 'a>.
>

..and here I meant job_irq_init should return 
Result<impl PinInit<TyrIrqRegistration<'a, JobIrq>, Error> + 'a> and
TyrRegistration::request() should return 
Result<impl PinInit<Self, Error> + 'a>. Sorry for the confusion.

Using a pin initializer seems the right direction regardless[1], so I'll
make the change.

Best,

Laura

[1] https://lore.kernel.org/all/[email protected]/

Reply via email to