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

From: Andreas Hindborg
Date: Tue Mar 04 2025 - 08:06:09 EST


"Daniel Almeida" <daniel.almeida@xxxxxxxxxxxxx> writes:

> Hi Christian,
>
>> On 23 Jan 2025, at 13:00, Christian Schrefl <chrisi.schrefl@xxxxxxxxx> wrote:
>>
>> On 22.01.25 5:39 PM, Daniel Almeida wrote:
>>> Add support for registering IRQ handlers in Rust.

[...]

>>> +/// The flags that can be used when registering an IRQ handler.
>>> +pub mod flags {
>>
>> Maybe move flags into a separate file?
>> You even have a directory for irq.
>
> Why? Most flags are defined in the same file. See alloc::flags, for example.
>
> I am not against this, but since this is merely aesthetic in nature, we should maybe
> wait for input from more people.

I would prefer them in another file as well. Not a hard requirement though.

[...]

>>> +/// // This will run (in a separate kthread) iff `handle_irq` returns
>> typo iff
>
> I mean the acronym for “if and only if”.

Since it is not immediately obvious to all readers, prefer "if and only
if". I think we discussed this at pin-init patches a long while ago.


Best regards,
Andreas Hindborg