aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/pci/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/pci/pci.c')
-rw-r--r--arch/s390/pci/pci.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c
index d59c82569750..3290f11ae1d9 100644
--- a/arch/s390/pci/pci.c
+++ b/arch/s390/pci/pci.c
@@ -369,8 +369,7 @@ int arch_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
369 369
370 if (type == PCI_CAP_ID_MSI && nvec > 1) 370 if (type == PCI_CAP_ID_MSI && nvec > 1)
371 return 1; 371 return 1;
372 msi_vecs = min(nvec, ZPCI_MSI_VEC_MAX); 372 msi_vecs = min_t(unsigned int, nvec, zdev->max_msi);
373 msi_vecs = min_t(unsigned int, msi_vecs, CONFIG_PCI_NR_MSI);
374 373
375 /* Allocate adapter summary indicator bit */ 374 /* Allocate adapter summary indicator bit */
376 rc = -EIO; 375 rc = -EIO;
@@ -474,7 +473,8 @@ static void zpci_map_resources(struct zpci_dev *zdev)
474 len = pci_resource_len(pdev, i); 473 len = pci_resource_len(pdev, i);
475 if (!len) 474 if (!len)
476 continue; 475 continue;
477 pdev->resource[i].start = (resource_size_t) pci_iomap(pdev, i, 0); 476 pdev->resource[i].start =
477 (resource_size_t __force) pci_iomap(pdev, i, 0);
478 pdev->resource[i].end = pdev->resource[i].start + len - 1; 478 pdev->resource[i].end = pdev->resource[i].start + len - 1;
479 } 479 }
480} 480}
@@ -489,7 +489,8 @@ static void zpci_unmap_resources(struct zpci_dev *zdev)
489 len = pci_resource_len(pdev, i); 489 len = pci_resource_len(pdev, i);
490 if (!len) 490 if (!len)
491 continue; 491 continue;
492 pci_iounmap(pdev, (void *) pdev->resource[i].start); 492 pci_iounmap(pdev, (void __iomem __force *)
493 pdev->resource[i].start);
493 } 494 }
494} 495}
495 496