Linux PCI subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Danilo Krummrich" <dakr@kernel.org>
Cc: linux-pci@vger.kernel.org, ojeda@kernel.org
Subject: Re: [PATCH v2 5/5] rust: pci: expose the allocated interrupt type
Date: Tue, 11 Aug 2026 23:46:46 +0000	[thread overview]
Message-ID: <20260811234646.AF4921F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260811233952.3000968-6-dakr@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The `irq_type` method on `IrqVector` is missing the `#[inline]` attribute, which is required by the subsystem guidelines for small forwarding functions in abstractions.
--

--- Patch [5]: [PATCH v2 5/5] rust: pci: expose the allocated interrupt type ---
commit 2729ea5a5c9bd73b2db961974f58b91749e6fbc9
Author: Danilo Krummrich <dakr@kernel.org>

rust: pci: expose the allocated interrupt type

This commit adds irq_type() methods to IrqVectorRegistration and IrqVector to
wrap the pci_irq_type() C function. This allows drivers to query the interrupt
type rather than assuming which type the PCI core selected.

Link: https://lore.kernel.org/all/20260808031120.363869-4-jhubbard@nvidia.com/

> diff --git a/rust/kernel/pci/irq.rs b/rust/kernel/pci/irq.rs
> index b3dce5b49d571..41059b922492e 100644
> --- a/rust/kernel/pci/irq.rs
> +++ b/rust/kernel/pci/irq.rs
[ ... ]
> @@ -106,6 +116,11 @@ pub fn index(&self) -> usize {
>      pub fn vectors(&self) -> &'a IrqVectorRegistration<'a> {
>          self.reg
>      }
> +
> +    /// Returns the interrupt type the PCI core selected for this vector's allocation.
> +    pub fn irq_type(&self) -> IrqType {
> +        self.reg.irq_type()
> +    }

[Severity: Low]
This isn't a bug, but should this method have an #[inline] annotation?

The Rust subsystem guidelines specify that small or forwarding functions in
abstractions should be annotated with #[inline]. Since this just forwards to
self.reg.irq_type(), adding the annotation would ensure it aligns with the
coding guidelines.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260811233952.3000968-1-dakr@kernel.org?part=5

      reply	other threads:[~2026-08-11 23:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-11 23:39 [PATCH v2 0/5] Rework PCI IRQ vector code Danilo Krummrich
2026-08-11 23:39 ` [PATCH v2 1/5] rust: pci: convert IrqVectorRegistration to a lifetime-managed owning type Danilo Krummrich
2026-08-11 23:52   ` sashiko-bot
2026-08-11 23:39 ` [PATCH v2 2/5] rust: pci: resolve IRQ in vector() and embed IrqRequest in IrqVector Danilo Krummrich
2026-08-11 23:48   ` sashiko-bot
2026-08-11 23:39 ` [PATCH v2 3/5] rust: pci: remove request_irq() and request_threaded_irq() from Device Danilo Krummrich
2026-08-11 23:47   ` sashiko-bot
2026-08-11 23:39 ` [PATCH v2 4/5] PCI: Add pci_irq_type() to query the allocated interrupt type Danilo Krummrich
2026-08-11 23:44   ` sashiko-bot
2026-08-11 23:39 ` [PATCH v2 5/5] rust: pci: expose " Danilo Krummrich
2026-08-11 23:46   ` sashiko-bot [this message]

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=20260811234646.AF4921F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dakr@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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