Skip to contentSkip to conversation

ahci: use PCI_IRQ_MSI_TYPES where appropriate

PATCH Applied Piotr Stankiewicz 2 participants 2 messages Jun 2, 2020 – Jun 3, 2020 libata

v1 of 4 Applied Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 4/15 ahci: use PCI_IRQ_MSI_TYPES where appropriate

Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it.

---
 drivers/ata/ahci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/ahci.c +1 -1
index 0c0a736eb861..ca1bf4ef0f17 100644
@@ -1556,7 +1556,7 @@ static int ahci_init_msi(struct pci_dev *pdev, unsigned int n_ports,
 	 */
 	if (n_ports > 1) {
 		nvec = pci_alloc_irq_vectors(pdev, n_ports, INT_MAX,
-				PCI_IRQ_MSIX | PCI_IRQ_MSI);
+				PCI_IRQ_MSI_TYPES);
 		if (nvec > 0) {
 			if (!(readl(hpriv->mmio + HOST_CTL) & HOST_MRSM)) {
 				hpriv->get_irq_vector = ahci_get_irq_vector;
Signature · 1 line
2.17.2
#1 lore raw
Quoted 5 lines · Piotr Stankiewicz

Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it.

Im not sure where PCI_IRQ_MSI_TYPES appeared (I can't find it in mainline), but I think replacing the supported list of types with this weird group is no in any way a good idea.