From: sashiko-bot@kernel.org
To: "Danilo Krummrich" <dakr@kernel.org>
Cc: ojeda@kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH v3 4/5] PCI: Add pci_irq_type() to query the allocated interrupt type
Date: Thu, 13 Aug 2026 17:04:40 +0000 [thread overview]
Message-ID: <20260813170440.C49B21F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260813165234.620555-5-dakr@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Missing dummy implementation of pci_irq_type() for !CONFIG_PCI configurations
--
--- Patch [4]: [PATCH v3 4/5] PCI: Add pci_irq_type() to query the allocated interrupt type ---
commit dc3ae5a104b31d99bffe0b8a2992cb68e0130731
Author: Danilo Krummrich <dakr@kernel.org>
PCI: Add pci_irq_type() to query the allocated interrupt type
This patch adds a helper function to return the interrupt type (MSI-X, MSI,
or INTX) that the PCI core selected after a successful call to
pci_alloc_irq_vectors(). It provides a common way for drivers to query this
information without directly accessing the pci_dev bitfields.
Link: https://elixir.bootlin.com/linux/v7.1/source/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c#L196 [1]
Link: https://lore.kernel.org/all/DKKG2QM3YJYB.Z2H2B2UXJ75N@kernel.org/ [2]
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index 64b308b6e61c1..80b8561b5be0b 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
[ ... ]
> @@ -1845,6 +1865,11 @@ static inline const struct cpumask *pci_irq_get_affinity(struct pci_dev *pdev,
> {
> return cpu_possible_mask;
> }
> +
> +static inline unsigned int pci_irq_type(struct pci_dev *pdev)
> +{
> + return PCI_IRQ_INTX;
> +}
> #endif
[Severity: Low]
Does this also need a dummy implementation in the !CONFIG_PCI block?
This patch adds a fallback implementation for when CONFIG_PCI_MSI is disabled,
but misses adding a stub for when CONFIG_PCI is completely disabled. Other IRQ
vector API functions provide stubs in the !CONFIG_PCI block to ensure drivers
compile cleanly on architectures without PCI support:
include/linux/pci.h:
static inline int
pci_alloc_irq_vectors(struct pci_dev *dev, unsigned int min_vecs,
unsigned int max_vecs, unsigned int flags)
{
return -ENOSPC;
}
static inline void pci_free_irq_vectors(struct pci_dev *dev)
{
}
#endif /* CONFIG_PCI */
Could the lack of a pci_irq_type() stub in include/linux/pci.h introduce a
compile regression when building a kernel with CONFIG_PCI=n where a generic
driver calls pci_irq_type()?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260813165234.620555-1-dakr@kernel.org?part=4
next prev parent reply other threads:[~2026-08-13 17:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-13 16:52 [PATCH v3 0/5] Rework PCI IRQ vector code Danilo Krummrich
2026-08-13 16:52 ` [PATCH v3 1/5] rust: pci: convert IrqVectorRegistration to a lifetime-managed owning type Danilo Krummrich
2026-08-13 17:06 ` sashiko-bot
2026-08-13 16:52 ` [PATCH v3 2/5] rust: pci: resolve IRQ in index() and embed IrqRequest in IrqVector Danilo Krummrich
2026-08-13 17:00 ` Gary Guo
2026-08-13 17:11 ` sashiko-bot
2026-08-13 16:52 ` [PATCH v3 3/5] rust: pci: remove request_irq() and request_threaded_irq() from Device Danilo Krummrich
2026-08-13 17:05 ` sashiko-bot
2026-08-13 16:52 ` [PATCH v3 4/5] PCI: Add pci_irq_type() to query the allocated interrupt type Danilo Krummrich
2026-08-13 17:04 ` sashiko-bot [this message]
2026-08-13 16:52 ` [PATCH v3 5/5] rust: pci: expose " Danilo Krummrich
2026-08-13 17:07 ` sashiko-bot
2026-08-13 17:02 ` [PATCH v3 0/5] Rework PCI IRQ vector code Gary Guo
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=20260813170440.C49B21F000E9@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.