Re: [PATCH v3 5/5] rust: pci: expose the allocated interrupt type

[email protected]
Newsgroups org.kernel.vger.linux-pci
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] rust_helper_pci_irq_type() causes a build failure when CONFIG_PCI is disabled because pci_irq_type() is undefined.
--

--- Patch [5]: [PATCH v3 5/5] rust: pci: expose the allocated interrupt type ---
commit 60bd93f7488eb98904a6a089158302157e26da1d
Author: Danilo Krummrich <[email protected]>

rust: pci: expose the allocated interrupt type

This commit adds irq_type() on IrqVectorRegistration and IrqVector, wrapping
the new pci_irq_type() C function. It allows a driver to query the allocated
interrupt type (MSI-X, MSI, or INTx).

Link: https://lore.kernel.org/all/[email protected]/

> diff --git a/rust/helpers/pci.c b/rust/helpers/pci.c
> index e44905317d759..23b06becb4489 100644
> --- a/rust/helpers/pci.c
> +++ b/rust/helpers/pci.c
> @@ -24,6 +24,11 @@ __rust_helper bool rust_helper_dev_is_pci(const struct device *dev)
>  	return dev_is_pci(dev);
>  }
>  
> +__rust_helper unsigned int rust_helper_pci_irq_type(struct pci_dev *pdev)
> +{
> +	return pci_irq_type(pdev);
> +}
> +

[Severity: Low]
Does this code cause a build failure when CONFIG_PCI is disabled?

It looks like this regression could result in an implicit declaration error,
because there is no fallback stub for pci_irq_type() in the CONFIG_PCI=n
block of include/linux/pci.h, and this helper is unconditionally compiled here.

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=5
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.