rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Hindborg <a.hindborg@kernel.org>
To: "Daniel Almeida" <daniel.almeida@collabora.com>
Cc: <ojeda@kernel.org>,  <alex.gaynor@gmail.com>,
	 <boqun.feng@gmail.com>, <gary@garyguo.net>,
	 <bjorn3_gh@protonmail.com>, <benno.lossin@proton.me>,
	 <tmgross@umich.edu>, <rust-for-linux@vger.kernel.org>,
	 <linux-kernel@vger.kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>
Subject: Re: [PATCH v2] rust: irq: add support for request_irq()
Date: Tue, 04 Mar 2025 14:11:00 +0100	[thread overview]
Message-ID: <87ikopgcuz.fsf@kernel.org> (raw)
In-Reply-To: <D058ABBE-A0E8-4D95-AA4F-31EAA4092A73@collabora.com> (Daniel Almeida's message of "Mon, 10 Feb 2025 05:41:17 -0300")

"Daniel Almeida" <daniel.almeida@collabora.com> writes:

>> On 22 Jan 2025, at 13:39, Daniel Almeida <daniel.almeida@collabora.com> wrote:
>>
>> Add support for registering IRQ handlers in Rust.

[...]

>> +/// use kernel::prelude::*;
>> +/// use kernel::irq::request::flags;
>> +/// use kernel::irq::request::Registration;
>
> 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.

For block I usually import `mq` if there can be clashes, then I can use
`mq::Request`, which is not so bad. I think a reexport to make
`irq::request::Request` available as `irq::Request` would be nice.

In `mq`, most sub modules are not pub, so the only way to reach the
types is through the reexport.


Best regards,
Andreas Hindborg




  parent reply	other threads:[~2025-03-04 13:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <u-vC1KbeOK3Fd2PClzinb8LmqS_dntOW-pOSmZIFWotCZeTOg30xR_GYUc4oReAKZeuuu7ZaXWzfeTkpGMlr0A==@protonmail.internalid>
2025-01-22 16:39 ` [PATCH v2] rust: irq: add support for request_irq() Daniel Almeida
2025-01-23  7:17   ` Boqun Feng
2025-01-23  9:07     ` Alice Ryhl
2025-05-14 14:44       ` Daniel Almeida
2025-05-15 17:17         ` Christian Schrefl
2025-01-23 16:00   ` Christian Schrefl
2025-01-23 16:27     ` Daniel Almeida
2025-01-23 17:09       ` Christian Schrefl
2025-03-04 13:05       ` Andreas Hindborg
2025-02-10  8:41   ` Daniel Almeida
2025-02-10 16:41     ` Guangbo Cui
2025-03-04 13:11     ` Andreas Hindborg [this message]
2025-03-04 13:43   ` Andreas Hindborg
2025-03-04 16:48     ` Daniel Almeida
2025-03-17 14:58     ` Alice Ryhl
2025-05-09 13:58     ` Daniel Almeida

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ikopgcuz.fsf@kernel.org \
    --to=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=daniel.almeida@collabora.com \
    --cc=gary@garyguo.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).