Re: [PATCH v6 6/6] rust: pci: add irq accessors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 03, 2025 at 04:30:04PM -0300, Daniel Almeida wrote:
> +    /// Returns an [`IrqRequest`] for the IRQ vector at the given index, if any.
> +    pub fn request_irq_by_index(&self, index: u32) -> Result<IrqRequest<'_>> {

Same comment as for platform:

Please name the functions returning an IrqRequest without the 'request' prefix.
And instead put the 'request' prefix in front of the methods that return a
actual irq::Registration.

Besides that, I think we shouldn't name this method 'by_index'. Please align it
with the C function, i.e. Device::irq_vector().

> +    pub fn irq_by_index<T: crate::irq::Handler + 'static>(

I'd go with just request_irq() for this one and

> +    pub fn threaded_irq_by_index<T: crate::irq::ThreadedHandler + 'static>(

request_threaded_irq() for this one.




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux