Re: [PATCH v2] PCI: Provide pci_free_irq_vectors() for CONFIG_PCI=n
From: Danilo Krummrich
Date: Mon Jan 12 2026 - 11:30:22 EST
On Fri Dec 26, 2025 at 12:39 PM CET, Boqun Feng wrote:
> Commit 473b9f331718 ("rust: pci: fix build failure when CONFIG_PCI_MSI
> is disabled") fixed a build error by providing rust helpers when
> CONFIG_PCI_MSI=n. However the rust helpers rely on the
> pci_alloc_irq_vectors() function is defined, which is not true when
> CONFIG_PCI=n. There are multiple ways to fix this, e.g. a possible fix
> could be just remove the calling of pci_alloc_irq_vectors() since it's
> empty when CONFIG_PCI_MSI=n anyway. However, since PCI irq APIs, such as
> pci_alloc_irq_vectors(), are already defined even when CONFIG_PCI=n, the
> more reasonable fix is to define pci_alloc_irq_vectors() when
> CONFIG_PCI=n and this aligns with the situations of other primitives as
> well.
>
> Reported-by: FUJITA Tomonori <fujita.tomonori@xxxxxxxxx>
> Closes: https://lore.kernel.org/rust-for-linux/20251209014312.575940-1-fujita.tomonori@xxxxxxxxx/
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Closes: https://lore.kernel.org/oe-kbuild-all/202512220740.4Kexm4dW-lkp@xxxxxxxxx/
> Reported-by: Liang Jie <liangjie@xxxxxxxxxxx>
> Closes: https://lore.kernel.org/rust-for-linux/20251222034415.1384223-1-buaajxlj@xxxxxxx/
> Fixes: 473b9f331718 ("rust: pci: fix build failure when CONFIG_PCI_MSI is disabled")
> Reviewed-by: Drew Fustini <fustini@xxxxxxxxxx>
> Reviewed-by: David Gow <davidgow@xxxxxxxxxx>
> Reviewed-by: Joel Fernandes <joelagnelf@xxxxxxxxxx>
> Reviewed-by: Danilo Krummrich <dakr@xxxxxxxxxx>
> Signed-off-by: Boqun Feng <boqun.feng@xxxxxxxxx>
Bjorn, I just received another bug report due to this issue. Can you please pick
this up for the next -rc?
If you don't have anything else to send, I can pick it up as well. :)
Thanks,
Danilo