[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tencent_EFD0399A6FA413B4B3597F93965D966BE40A@qq.com>
Date: Tue, 11 Feb 2025 00:41:59 +0800
From: Guangbo Cui <2407018371@...com>
To: daniel.almeida@...labora.com
Cc: a.hindborg@...nel.org,
alex.gaynor@...il.com,
aliceryhl@...gle.com,
benno.lossin@...ton.me,
bjorn3_gh@...tonmail.com,
boqun.feng@...il.com,
gary@...yguo.net,
linux-kernel@...r.kernel.org,
ojeda@...nel.org,
rust-for-linux@...r.kernel.org,
tmgross@...ch.edu,
dakr@...nel.org
Subject: Re: [PATCH v2] rust: irq: add support for request_irq()
> 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
Powered by blists - more mailing lists