Skip to content

Commit

Permalink
PCI/MSI: Make pci_enable_msi/msix() 'nvec' argument type as int
Browse files Browse the repository at this point in the history
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: Alexander Gordeev <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Reviewed-by: Tejun Heo <[email protected]>
  • Loading branch information
Alexander Gordeev authored and bjorn-helgaas committed Dec 20, 2013
1 parent 8ec5db6 commit 52179dc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Documentation/PCI/MSI-HOWTO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ call to succeed.

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
the maximum possible number of MSIs. The MSI specification only allows
Expand Down
4 changes: 2 additions & 2 deletions drivers/pci/msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
* 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;
u16 msgctl;
Expand Down Expand Up @@ -886,7 +886,7 @@ int pci_enable_msi_block(struct pci_dev *dev, unsigned int nvec)
}
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;
u16 msgctl;
Expand Down
8 changes: 4 additions & 4 deletions include/linux/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -1154,13 +1154,13 @@ struct msix_entry {


#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;
}

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;
}
Expand Down Expand Up @@ -1195,8 +1195,8 @@ static inline int pci_msi_enabled(void)
return 0;
}
#else
int pci_enable_msi_block(struct pci_dev *dev, unsigned int nvec);
int pci_enable_msi_block_auto(struct pci_dev *dev, unsigned int *maxvec);
int pci_enable_msi_block(struct pci_dev *dev, int nvec);
int pci_enable_msi_block_auto(struct pci_dev *dev, 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);
Expand Down

0 comments on commit 52179dc

Please sign in to comment.