Re: [PATCH v2 4/5] PCI: Add pci_irq_type() to query the allocated interrupt type

[email protected]
Newsgroups org.kernel.vger.linux-pci
Message-ID <[email protected]>
> Add a helper that returns PCI_IRQ_MSIX, PCI_IRQ_MSI, or PCI_IRQ_INTX
> based on the interrupt type the PCI core selected after
> pci_alloc_irq_vectors().
> 
> Several drivers already open-code this check against pdev->msix_enabled
> and pdev->msi_enabled, or even open code this helper [1].
> 
> A common helper avoids the duplication and keeps drivers from accessing
> the bitfield directly (see also [2]).
> 
> Acked-by: Bjorn Helgaas <[email protected]>
> Link: https://elixir.bootlin.com/linux/v7.1/source/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c#L196 [1]
> Inspired-by: John Hubbard <[email protected]>
> Link: https://lore.kernel.org/all/[email protected]/ [2]
> Signed-off-by: Danilo Krummrich <[email protected]>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4
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.