Skip to content

Commit 0e52247

Browse files
camm-xxjbarnes993
authored andcommitted
PCI: fix pci_resource_alignment prototype
This fixes the prototype for both pci_resource_alignment() and pci_sriov_resource_alignment(). Patch started as debugging effort from Cam Macdonell. Cc: Cam Macdonell <cam@cs.ualberta.ca> Cc: Avi Kivity <avi@redhat.com> [chrisw: add iov bits] Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
1 parent d56557a commit 0e52247

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

drivers/pci/iov.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ int pci_iov_resource_bar(struct pci_dev *dev, int resno,
608608
* the VF BAR size multiplied by the number of VFs. The alignment
609609
* is just the VF BAR size.
610610
*/
611-
int pci_sriov_resource_alignment(struct pci_dev *dev, int resno)
611+
resource_size_t pci_sriov_resource_alignment(struct pci_dev *dev, int resno)
612612
{
613613
struct resource tmp;
614614
enum pci_bar_type type;

drivers/pci/pci.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,8 @@ extern int pci_iov_init(struct pci_dev *dev);
264264
extern void pci_iov_release(struct pci_dev *dev);
265265
extern int pci_iov_resource_bar(struct pci_dev *dev, int resno,
266266
enum pci_bar_type *type);
267-
extern int pci_sriov_resource_alignment(struct pci_dev *dev, int resno);
267+
extern resource_size_t pci_sriov_resource_alignment(struct pci_dev *dev,
268+
int resno);
268269
extern void pci_restore_iov_state(struct pci_dev *dev);
269270
extern int pci_iov_bus_range(struct pci_bus *bus);
270271

@@ -320,7 +321,7 @@ static inline int pci_ats_enabled(struct pci_dev *dev)
320321
}
321322
#endif /* CONFIG_PCI_IOV */
322323

323-
static inline int pci_resource_alignment(struct pci_dev *dev,
324+
static inline resource_size_t pci_resource_alignment(struct pci_dev *dev,
324325
struct resource *res)
325326
{
326327
#ifdef CONFIG_PCI_IOV

0 commit comments

Comments
 (0)