PCI: use PCI_IRQ_MSI_TYPES where appropriate
Subsystems (2)
PATCH 3/15 PCI: 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.
Signed-off-by Piotr Stankiewicz <[email protected]>
Reviewed-by Andy Shevchenko <[email protected]>
--- drivers/pci/pcie/portdrv_core.c | 4 ++-- drivers/pci/switch/switchtec.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-)
drivers/pci/pcie/portdrv_core.c +2 -2
@@ -105,7 +105,7 @@ static int pcie_port_enable_irq_vec(struct pci_dev *dev, int *irqs, int mask)/* Allocate the maximum possible number of MSI/MSI-X vectors */ nr_entries =pci_alloc_irq_vectors (dev,1 ,PCIE_PORT_MAX_MSI_ENTRIES , -PCI_IRQ_MSIX |PCI_IRQ_MSI ); +PCI_IRQ_MSI_TYPES );if (nr_entries <0 )return nr_entries;
@@ -131,7 +131,7 @@ static int pcie_port_enable_irq_vec(struct pci_dev *dev, int *irqs, int mask)pci_free_irq_vectors (dev); nr_entries =pci_alloc_irq_vectors (dev, nvec, nvec, -PCI_IRQ_MSIX |PCI_IRQ_MSI ); +PCI_IRQ_MSI_TYPES );if (nr_entries <0 )return nr_entries; }
drivers/pci/switch/switchtec.c +1 -2
@@ -1442,8 +1442,7 @@ static int switchtec_init_isr(struct switchtec_dev *stdev) nirqs =4 ; nvecs =pci_alloc_irq_vectors (stdev->pdev,1 , nirqs, -PCI_IRQ_MSIX |PCI_IRQ_MSI | -PCI_IRQ_VIRTUAL ); +PCI_IRQ_MSI_TYPES |PCI_IRQ_VIRTUAL );if (nvecs <0 )return nvecs;
Signature · 1 line
2.17.2
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.
Signed-off-by Piotr Stankiewicz <[email protected]>Reviewed-by Andy Shevchenko <[email protected]>
Seems fine to me, for the switchtec portions:
Reviewed-by Logan Gunthorpe <[email protected]>
Quoted 42 lines
--- drivers/pci/pcie/portdrv_core.c | 4 ++-- drivers/pci/switch/switchtec.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-)drivers/pci/pcie/portdrv_core.c +2
-2@@ -105,7 +105,7 @@ static int pcie_port_enable_irq_vec(struct pci_dev *dev, int *irqs, int mask)/* Allocate the maximum possible number of MSI/MSI-X vectors */ nr_entries =pci_alloc_irq_vectors (dev,1 ,PCIE_PORT_MAX_MSI_ENTRIES , -PCI_IRQ_MSIX |PCI_IRQ_MSI ); +PCI_IRQ_MSI_TYPES );if (nr_entries <0 )return nr_entries;@@ -131,7 +131,7 @@ static int pcie_port_enable_irq_vec(struct pci_dev *dev, int *irqs, int mask)pci_free_irq_vectors (dev); nr_entries =pci_alloc_irq_vectors (dev, nvec, nvec, -PCI_IRQ_MSIX |PCI_IRQ_MSI ); +PCI_IRQ_MSI_TYPES );if (nr_entries <0 )return nr_entries; }drivers/pci/switch/switchtec.c +1
-2@@ -1442,8 +1442,7 @@ static int switchtec_init_isr(struct switchtec_dev *stdev) nirqs =4 ; nvecs =pci_alloc_irq_vectors (stdev->pdev,1 , nirqs, -PCI_IRQ_MSIX |PCI_IRQ_MSI | -PCI_IRQ_VIRTUAL ); +PCI_IRQ_MSI_TYPES |PCI_IRQ_VIRTUAL );if (nvecs <0 )return nvecs;