Re: [PATCH v2] rust: irq: add support for request_irq()

From: Guangbo Cui
Date: Mon Feb 10 2025 - 11:50:45 EST


> By the way, I wonder if a re-export would be beneficial? I find it a bit tedious to specify this path.
>
> It also clashes with kernel::driver::Registration and kernel::driver::drm::Registration, so I find myself
> continuously writing an alias for it, i.e.:
>
> ```
> Use kernel::irq::request::Registration as IrqRegistration;
> Use kernel::irq::request::Handler as IrqHandler;
> ```
>
> Looking at mq.rs <http://mq.rs/>, I see Andreas did something similar:
>
> ```
> pub use operations::Operations;
> pub use request::Request;
> pub use tag_set::TagSet;
> ```
>
> Asking for opinions here since this is a bit cosmetic in nature. IMHO, at least the ‘request’ part of the path has to go.

Maybe the Rust subsystem should have a unified convention for this?
Re-export is both beneficial and necessary. The naming retains `Registration`
and `Handler` to be consistent with other modules. And accessing it with the
module prefix, such as `irq::Registration`. Just like @dakr did in `rust_driver_pci.rs`
and `rust_driver_platform.rs`: `pci::Driver` & `platform::Driver`; `pci::Device` & `platform::Device`.

Hope this help, if not, ignore it.

Best regards,
Guangbo Cui