summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2016-01-22 13:11:21 (GMT)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2016-01-26 11:46:45 (GMT)
commitf5e44f82c1848d8e55fb0061308f14c0884e5483 (patch)
treeba74ab56d98031e9fc83e154b8691b5900321d6f /arch
parent8ead7efb6379354d0d31efb39342f4399c87cb67 (diff)
downloadlinux-f5e44f82c1848d8e55fb0061308f14c0884e5483.tar.xz
s390/pci: remove iomap sanity checks
Since each iomap_entry handles only one bar of one pci function (even when disjunct ranges of a bar are mapped) the sanity check in pci_iomap_range is not needed and can be removed. Also convert the remaining BUG_ONs to WARN_ONs. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/pci/pci.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c
index d28d194..8f19c8f 100644
--- a/arch/s390/pci/pci.c
+++ b/arch/s390/pci/pci.c
@@ -275,15 +275,10 @@ void __iomem *pci_iomap_range(struct pci_dev *pdev,
idx = zdev->bars[bar].map_idx;
spin_lock(&zpci_iomap_lock);
- if (zpci_iomap_start[idx].count++) {
- BUG_ON(zpci_iomap_start[idx].fh != zdev->fh ||
- zpci_iomap_start[idx].bar != bar);
- } else {
- zpci_iomap_start[idx].fh = zdev->fh;
- zpci_iomap_start[idx].bar = bar;
- }
/* Detect overrun */
- BUG_ON(!zpci_iomap_start[idx].count);
+ WARN_ON(!++zpci_iomap_start[idx].count);
+ zpci_iomap_start[idx].fh = zdev->fh;
+ zpci_iomap_start[idx].bar = bar;
spin_unlock(&zpci_iomap_lock);
return (void __iomem *) ZPCI_ADDR(idx) + offset;
@@ -302,7 +297,7 @@ void pci_iounmap(struct pci_dev *pdev, void __iomem *addr)
spin_lock(&zpci_iomap_lock);
/* Detect underrun */
- BUG_ON(!zpci_iomap_start[idx].count);
+ WARN_ON(!zpci_iomap_start[idx].count);
if (!--zpci_iomap_start[idx].count) {
zpci_iomap_start[idx].fh = 0;
zpci_iomap_start[idx].bar = 0;