Commit 52179dc9 authored by Alexander Gordeev's avatar Alexander Gordeev Committed by Bjorn Helgaas

PCI/MSI: Make pci_enable_msi/msix() 'nvec' argument type as int

Make pci_enable_msi_block(), pci_enable_msi_block_auto() and
pci_enable_msix() consistent with regard to the type of 'nvec' argument.
Signed-off-by: default avatarAlexander Gordeev <agordeev@redhat.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: default avatarTejun Heo <tj@kernel.org>
parent 8ec5db6b
...@@ -129,7 +129,7 @@ call to succeed. ...@@ -129,7 +129,7 @@ call to succeed.
4.2.3 pci_enable_msi_block_auto 4.2.3 pci_enable_msi_block_auto
int pci_enable_msi_block_auto(struct pci_dev *dev, unsigned int *count) int pci_enable_msi_block_auto(struct pci_dev *dev, int *count)
This variation on pci_enable_msi() call allows a device driver to request This variation on pci_enable_msi() call allows a device driver to request
the maximum possible number of MSIs. The MSI specification only allows the maximum possible number of MSIs. The MSI specification only allows
......
...@@ -855,7 +855,7 @@ static int pci_msi_check_device(struct pci_dev *dev, int nvec, int type) ...@@ -855,7 +855,7 @@ static int pci_msi_check_device(struct pci_dev *dev, int nvec, int type)
* updates the @dev's irq member to the lowest new interrupt number; the * updates the @dev's irq member to the lowest new interrupt number; the
* other interrupt numbers allocated to this device are consecutive. * other interrupt numbers allocated to this device are consecutive.
*/ */
int pci_enable_msi_block(struct pci_dev *dev, unsigned int nvec) int pci_enable_msi_block(struct pci_dev *dev, int nvec)
{ {
int status, maxvec; int status, maxvec;
u16 msgctl; u16 msgctl;
...@@ -886,7 +886,7 @@ int pci_enable_msi_block(struct pci_dev *dev, unsigned int nvec) ...@@ -886,7 +886,7 @@ int pci_enable_msi_block(struct pci_dev *dev, unsigned int nvec)
} }
EXPORT_SYMBOL(pci_enable_msi_block); EXPORT_SYMBOL(pci_enable_msi_block);
int pci_enable_msi_block_auto(struct pci_dev *dev, unsigned int *maxvec) int pci_enable_msi_block_auto(struct pci_dev *dev, int *maxvec)
{ {
int ret, nvec; int ret, nvec;
u16 msgctl; u16 msgctl;
......
...@@ -1154,13 +1154,13 @@ struct msix_entry { ...@@ -1154,13 +1154,13 @@ struct msix_entry {
#ifndef CONFIG_PCI_MSI #ifndef CONFIG_PCI_MSI
static inline int pci_enable_msi_block(struct pci_dev *dev, unsigned int nvec) static inline int pci_enable_msi_block(struct pci_dev *dev, int nvec)
{ {
return -ENOSYS; return -ENOSYS;
} }
static inline int static inline int
pci_enable_msi_block_auto(struct pci_dev *dev, unsigned int *maxvec) pci_enable_msi_block_auto(struct pci_dev *dev, int *maxvec)
{ {
return -ENOSYS; return -ENOSYS;
} }
...@@ -1195,8 +1195,8 @@ static inline int pci_msi_enabled(void) ...@@ -1195,8 +1195,8 @@ static inline int pci_msi_enabled(void)
return 0; return 0;
} }
#else #else
int pci_enable_msi_block(struct pci_dev *dev, unsigned int nvec); int pci_enable_msi_block(struct pci_dev *dev, int nvec);
int pci_enable_msi_block_auto(struct pci_dev *dev, unsigned int *maxvec); int pci_enable_msi_block_auto(struct pci_dev *dev, int *maxvec);
void pci_msi_shutdown(struct pci_dev *dev); void pci_msi_shutdown(struct pci_dev *dev);
void pci_disable_msi(struct pci_dev *dev); void pci_disable_msi(struct pci_dev *dev);
int pci_msix_table_size(struct pci_dev *dev); int pci_msix_table_size(struct pci_dev *dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment