Make pci_enable_msix() and pci_enable_msi_block() consistent with regard to the type of 'nvec' argument. Indeed, a number of vectors to allocate is a natural value, so make it unsigned. Signed-off-by: Alexander Gordeev <agordeev@xxxxxxxxxx> --- Documentation/PCI/MSI-HOWTO.txt | 3 ++- drivers/pci/msi.c | 3 ++- include/linux/pci.h | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Documentation/PCI/MSI-HOWTO.txt b/Documentation/PCI/MSI-HOWTO.txt index a091780..845edb5 100644 --- a/Documentation/PCI/MSI-HOWTO.txt +++ b/Documentation/PCI/MSI-HOWTO.txt @@ -190,7 +190,8 @@ same number. 4.3.1 pci_enable_msix -int pci_enable_msix(struct pci_dev *dev, struct msix_entry *entries, int nvec) +int pci_enable_msix(struct pci_dev *dev, + struct msix_entry *entries, unsigned int nvec) Calling this function asks the PCI subsystem to allocate 'nvec' MSIs. The 'entries' argument is a pointer to an array of msix_entry structs diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index bbe3d3d..fdae3a4 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -932,7 +932,8 @@ int pci_msix_table_size(struct pci_dev *dev) * of irqs or MSI-X vectors available. Driver should use the returned value to * re-send its request. **/ -int pci_enable_msix(struct pci_dev *dev, struct msix_entry *entries, int nvec) +int pci_enable_msix(struct pci_dev *dev, + struct msix_entry *entries, unsigned int nvec) { int status, nr_entries; int i, j; diff --git a/include/linux/pci.h b/include/linux/pci.h index 5cfe54c..d6832de 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1167,7 +1167,7 @@ static inline int pci_msix_table_size(struct pci_dev *dev) return 0; } static inline int pci_enable_msix(struct pci_dev *dev, - struct msix_entry *entries, int nvec) + struct msix_entry *entries, int unsigned nvec) { return -ENOSYS; } @@ -1192,7 +1192,8 @@ int pci_enable_msi_block_auto(struct pci_dev *dev, unsigned int *maxvec); void pci_msi_shutdown(struct pci_dev *dev); void pci_disable_msi(struct pci_dev *dev); int pci_msix_table_size(struct pci_dev *dev); -int pci_enable_msix(struct pci_dev *dev, struct msix_entry *entries, int nvec); +int pci_enable_msix(struct pci_dev *dev, + struct msix_entry *entries, unsigned int nvec); void pci_msix_shutdown(struct pci_dev *dev); void pci_disable_msix(struct pci_dev *dev); void msi_remove_pci_irq_vectors(struct pci_dev *dev); -- 1.7.7.6 -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html