PCI/MSI: Remove obsolete sanity checks for multiple interrupt sets
authorThomas Gleixner <[email protected]>
Sat, 16 Feb 2019 17:13:12 +0000 (18:13 +0100)
committerThomas Gleixner <[email protected]>
Mon, 18 Feb 2019 10:21:29 +0000 (11:21 +0100)
Multiple interrupt sets for affinity spreading are now handled in the core
code and the number of sets and their size is recalculated via a driver
supplied callback.

That avoids the requirement to invoke pci_alloc_irq_vectors_affinity() with
the arguments minvecs and maxvecs set to the same value and the callsite
handling the ENOSPC situation.

Remove the now obsolete sanity checks and the related comments.

Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Ming Lei <[email protected]>
Acked-by: Marc Zyngier <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Bjorn Helgaas <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: [email protected]
Cc: Sagi Grimberg <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Keith Busch <[email protected]>
Cc: Sumit Saxena <[email protected]>
Cc: Kashyap Desai <[email protected]>
Cc: Shivasharan Srikanteshwara <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
drivers/pci/msi.c

index 7149d631572614ed1af043f97a9b65a237a8b1b7..73986825d22116ccd72219f2ebf84a22bad7db96 100644 (file)
@@ -1035,13 +1035,6 @@ static int __pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec,
        if (maxvec < minvec)
                return -ERANGE;
 
-       /*
-        * If the caller is passing in sets, we can't support a range of
-        * vectors. The caller needs to handle that.
-        */
-       if (affd && affd->nr_sets && minvec != maxvec)
-               return -EINVAL;
-
        if (WARN_ON_ONCE(dev->msi_enabled))
                return -EINVAL;
 
@@ -1093,13 +1086,6 @@ static int __pci_enable_msix_range(struct pci_dev *dev,
        if (maxvec < minvec)
                return -ERANGE;
 
-       /*
-        * If the caller is passing in sets, we can't support a range of
-        * supported vectors. The caller needs to handle that.
-        */
-       if (affd && affd->nr_sets && minvec != maxvec)
-               return -EINVAL;
-
        if (WARN_ON_ONCE(dev->msix_enabled))
                return -EINVAL;